473,465 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Extract Data from HTML source

Please help, I'm trying to grab some data from some html source. I'm using
VB.NET (2003).

Below is a snippet of the html source:
<div class="Individualdetails" id="Individual">Mark Long</p><p>
8823 Big Mark Drive<br/>Showtown, AL 12345</p><p>Phone: (205)
555-5000<br/>Fax: (205)
555-5555</p></div>

The following is the results i need in a table:
Name: Mark Long
Address: 8823 Big Mark Drive
City: Showtown
State: AL
ZipCode: 12345
Phone: 205-555-5000
Fax: 205-555-5555

Basically i'm having trouble building the regular expression needed to pull
this data and
i'm looking for guidance in the right direction. Any help would be greatly
appreciated!
Oct 24 '06 #1
5 4536
A Regex isn't necessarily the best solution here. If you have a
guarantee that your document will be XHTML compliant (and your <br />
will always be an empty, closed tag) you could load it up into an
XmlReader and step through the nodes. That's one way.

There's an HTML munging library out there that was mentioned in a post
the other day. I'll see if I can dig the link back out because that
looked quite slick. I think a regex here is probably not the optimal
solution, though it's possible.

Leon wrote:
Please help, I'm trying to grab some data from some html source. I'm using
VB.NET (2003).

Below is a snippet of the html source:
<div class="Individualdetails" id="Individual">Mark Long</p><p>
8823 Big Mark Drive<br/>Showtown, AL 12345</p><p>Phone: (205)
555-5000<br/>Fax: (205)
555-5555</p></div>

The following is the results i need in a table:
Name: Mark Long
Address: 8823 Big Mark Drive
City: Showtown
State: AL
ZipCode: 12345
Phone: 205-555-5000
Fax: 205-555-5555

Basically i'm having trouble building the regular expression needed to pull
this data and
i'm looking for guidance in the right direction. Any help would be greatly
appreciated!
Oct 25 '06 #2
its probably the html agility pack

http://www.codeplex.com/Wiki/View.as...tmlagilitypack
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Flinky Wisty Pomm" <Pa********@gmail.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
>A Regex isn't necessarily the best solution here. If you have a
guarantee that your document will be XHTML compliant (and your <br />
will always be an empty, closed tag) you could load it up into an
XmlReader and step through the nodes. That's one way.

There's an HTML munging library out there that was mentioned in a post
the other day. I'll see if I can dig the link back out because that
looked quite slick. I think a regex here is probably not the optimal
solution, though it's possible.

Leon wrote:
>Please help, I'm trying to grab some data from some html source. I'm
using
VB.NET (2003).

Below is a snippet of the html source:
<div class="Individualdetails" id="Individual">Mark Long</p><p>
8823 Big Mark Drive<br/>Showtown, AL 12345</p><p>Phone: (205)
555-5000<br/>Fax: (205)
555-5555</p></div>

The following is the results i need in a table:
Name: Mark Long
Address: 8823 Big Mark Drive
City: Showtown
State: AL
ZipCode: 12345
Phone: 205-555-5000
Fax: 205-555-5555

Basically i'm having trouble building the regular expression needed to
pull
this data and
i'm looking for guidance in the right direction. Any help would be
greatly
appreciated!

Oct 25 '06 #3
That's the puppy.
John Timney (MVP) wrote:
its probably the html agility pack

http://www.codeplex.com/Wiki/View.as...tmlagilitypack
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Flinky Wisty Pomm" <Pa********@gmail.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
A Regex isn't necessarily the best solution here. If you have a
guarantee that your document will be XHTML compliant (and your <br />
will always be an empty, closed tag) you could load it up into an
XmlReader and step through the nodes. That's one way.

There's an HTML munging library out there that was mentioned in a post
the other day. I'll see if I can dig the link back out because that
looked quite slick. I think a regex here is probably not the optimal
solution, though it's possible.

Leon wrote:
Please help, I'm trying to grab some data from some html source. I'm
using
VB.NET (2003).

Below is a snippet of the html source:
<div class="Individualdetails" id="Individual">Mark Long</p><p>
8823 Big Mark Drive<br/>Showtown, AL 12345</p><p>Phone: (205)
555-5000<br/>Fax: (205)
555-5555</p></div>

The following is the results i need in a table:
Name: Mark Long
Address: 8823 Big Mark Drive
City: Showtown
State: AL
ZipCode: 12345
Phone: 205-555-5000
Fax: 205-555-5555

Basically i'm having trouble building the regular expression needed to
pull
this data and
i'm looking for guidance in the right direction. Any help would be
greatly
appreciated!
Oct 25 '06 #4
Could you give me an example please!

"Flinky Wisty Pomm" <Pa********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
That's the puppy.
John Timney (MVP) wrote:
>its probably the html agility pack

http://www.codeplex.com/Wiki/View.as...tmlagilitypack
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Flinky Wisty Pomm" <Pa********@gmail.comwrote in message
news:11*********************@e3g2000cwe.googlegro ups.com...
>A Regex isn't necessarily the best solution here. If you have a
guarantee that your document will be XHTML compliant (and your <br />
will always be an empty, closed tag) you could load it up into an
XmlReader and step through the nodes. That's one way.

There's an HTML munging library out there that was mentioned in a post
the other day. I'll see if I can dig the link back out because that
looked quite slick. I think a regex here is probably not the optimal
solution, though it's possible.

Leon wrote:

Please help, I'm trying to grab some data from some html source. I'm
using
VB.NET (2003).

Below is a snippet of the html source:
<div class="Individualdetails" id="Individual">Mark Long</p><p>
8823 Big Mark Drive<br/>Showtown, AL 12345</p><p>Phone: (205)
555-5000<br/>Fax: (205)
555-5555</p></div>

The following is the results i need in a table:
Name: Mark Long
Address: 8823 Big Mark Drive
City: Showtown
State: AL
ZipCode: 12345
Phone: 205-555-5000
Fax: 205-555-5555

Basically i'm having trouble building the regular expression needed to
pull
this data and
i'm looking for guidance in the right direction. Any help would be
greatly
appreciated!

Oct 25 '06 #5
Do a search on google, thers lots of blog examples of using it, so you
should be able to get started

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Leon" <vn*****@msn.comwrote in message
news:%2******************@TK2MSFTNGP05.phx.gbl...
Could you give me an example please!

"Flinky Wisty Pomm" <Pa********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>That's the puppy.
John Timney (MVP) wrote:
>>its probably the html agility pack

http://www.codeplex.com/Wiki/View.as...tmlagilitypack
--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Flinky Wisty Pomm" <Pa********@gmail.comwrote in message
news:11*********************@e3g2000cwe.googlegr oups.com...
A Regex isn't necessarily the best solution here. If you have a
guarantee that your document will be XHTML compliant (and your <br />
will always be an empty, closed tag) you could load it up into an
XmlReader and step through the nodes. That's one way.

There's an HTML munging library out there that was mentioned in a post
the other day. I'll see if I can dig the link back out because that
looked quite slick. I think a regex here is probably not the optimal
solution, though it's possible.

Leon wrote:

Please help, I'm trying to grab some data from some html source. I'm
using
VB.NET (2003).

Below is a snippet of the html source:
<div class="Individualdetails" id="Individual">Mark Long</p><p>
8823 Big Mark Drive<br/>Showtown, AL 12345</p><p>Phone: (205)
555-5000<br/>Fax: (205)
555-5555</p></div>

The following is the results i need in a table:
Name: Mark Long
Address: 8823 Big Mark Drive
City: Showtown
State: AL
ZipCode: 12345
Phone: 205-555-5000
Fax: 205-555-5555

Basically i'm having trouble building the regular expression needed
to
pull
this data and
i'm looking for guidance in the right direction. Any help would be
greatly
appreciated!


Oct 25 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tim Smith | last post by:
I am looking to extract form element values from html, more generally I have a substring that identifies the beginning of a value and a string that identifies the end of value and I need to extract...
0
by: Brian Hanson | last post by:
Hi, I have an unusual problem that just showed its ugly head at a pretty bad time. I have an asp.net (VB) app that takes data from an Excel sheet and puts it into SQL Server. I get the data...
10
by: Elric02 | last post by:
I'm currently trying to get access to the Python source code, however whenever I try to extract the files using the latest version of WinZip (version 10) I get the following error "error reading...
1
by: caine | last post by:
I want to extract web data from a news feed page http://everling.nierchi.net/mmubulletins.php. Just want to extract necessary info between open n closing tags of <title>, <categoryand <link>....
1
by: steveyjg | last post by:
I want to extract the following data from a retrieved html file and store the information as strings. 'get the text of "title" <h1 id="test_title">title</h1> 'get the contents of the value...
7
by: Ulysse | last post by:
Hello, I'm trying to extract the data from HTML table. Here is the part of the HTML source : """ <tr> <td class="tdn" valign="top"> <input name="x44553130" value="y" type="checkbox"></td>...
2
by: zerodevice | last post by:
Hi, I'm trying to code my php that allows me to extract or fetch the html codes from another website, then i'll filter it myself to get only the specific text i want and display or echo it directly...
1
by: maverickx | last post by:
Hi everyone, this is about my one project, i was planning to do like this: Firstly i printed out the source code of one html page on the DOS window, and then use PERL Regular Expression to extract...
4
by: SandIsland | last post by:
I am trying to extract just a portion of data from an XML data source: <Row> <Col Name="Col0">123456<CellColour>36</CellColour> <FontColour>1</FontColour> <Bottom>1</Bottom>...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.