-
February 28th, 2010, 05:48 PM
#1
Parsing HTML Help
Hi,
I am trying to parse some html in vb.net but i not sure how to do it.
The html that what i am trying to parse is:
Code:
<p> </p><table border="0" cellspacing="1" CellPadding="0" width="100%">
<tr>
<td align=left valign=top width="20%"><font size="2" ><b>Account Ref</b></font></td>
<td valign=top width="80%"><font size="2">LPharmacy</font></td>
</tr>
<tr>
<td><font size="2"><b>Date of booking</b></font>
</td><td><font size="2">Friday 14 August 2009</font></td>
</tr>
<tr>
<td><font size="2"><b>Time of booking</b></font>
</td><td><font size="2">17:35 ( 5:35 pm )</font></td>
</tr>
<tr>
<td><font size="2"><b>Booking No.</b></font>
</td><td><font size="2">51900</font></td>
</tr>
<tr>
<td><font size="2"><b>Vehicle type</b></font>
</td><td><font size="2">Car</font></td>
</tr>
<tr>
<td><font size="2"><b>Number of vehicles</b></font>
</td><td><font size="2">1</font></td></tr>
<tr>
<td><font size="2"><b>From</b>
</td><td><font size="2">Base, Whittington Moor</td>
</tr>
<tr>
</tr>
<tr>
<td><font size="2"><b>To</b></font>
</td><td><font size="2">Newbold, Newbold</font></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td><font size="2"><b>Order number</b></font>
</td><td><font size="2">140809-52</font></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td><font size="2"><b>Job price</b></font></td>
<td><font size="2">£3.10</font></td>
</tr>
</table>
The infomation i am trying to parse is in bold.
Many Thanks
-
March 3rd, 2010, 04:50 AM
#2
Re: Parsing HTML Help
you might have a look at regExp...
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
March 3rd, 2010, 05:29 PM
#3
Re: Parsing HTML Help
If the HTML is well formed you can try parsing it as XML. If it is not, you can look into HTML Agility Pack.
-
March 3rd, 2010, 07:09 PM
#4
Re: Parsing HTML Help
There are some great sample programs here.
Last edited by dglienna; March 3rd, 2010 at 07:12 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|