473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Parsing HTML

Hi,

I have a requirement where in I need to parse and get all the HTML and
custom specific tags from the HTML page.

I'm using mshtml and vb.net. One way i thought off was to use the regex
functions. Can I know what is the best way to parse and fetch all the tags or
if any one has worked on already can help me out so that I don't need to
reinvent the wheel.

Thanks in Advance.
Rgds,
--
Sindbaad
Nov 21 '05 #1
3 6684
Sindbaad,
There is an SgmlReader on www.gotdotnet.com that you might be able to use:

http://www.gotdotnet.com/Community/U...4-C3BD760564BC

Hope this helps
Jay

"Sindbaad" <si******@gmail.com> wrote in message
news:37**********************************@microsof t.com...
Hi,

I have a requirement where in I need to parse and get all the HTML and
custom specific tags from the HTML page.

I'm using mshtml and vb.net. One way i thought off was to use the regex
functions. Can I know what is the best way to parse and fetch all the tags
or
if any one has worked on already can help me out so that I don't need to
reinvent the wheel.

Thanks in Advance.
Rgds,
--
Sindbaad

Nov 21 '05 #2
"Sindbaad" <si******@gmail.com> schrieb:
I have a requirement where in I need to parse and get all the HTML and
custom specific tags from the HTML page.

I'm using mshtml and vb.net.
What doesn't work with MSHTML?
One way i thought off was to use the regex
functions. Can I know what is the best way to parse and fetch all the tags
or
if any one has worked on already can help me out so that I don't need to
reinvent the wheel.


..NET Html Agility Pack: How to use malformed HTML just like it was
well-formed XML...
<URL:http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx>

Download:

<URL:http://www.codefluent.com/smourier/download/htmlagilitypack.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Thanks for the update.

There are no problems with the MSHTML, I havn;t tried much with it. So I
just wanted to know further information on how to proceed on this.

The requirement is as below:
From the HTML page, I would to fetch all the custom tags in the order its
there in the HTML page.

eg:
<TR>
<TD class=smallText style="LINE-HEIGHT: 1.5" vAlign=top>
<FIRSTNAME>fstName</FIRSTNAME>
<LASTNAME>lstname</LASTNAME> <BR>
<ADDRESS1>addr</ADDRESS1><BR>
</TD></TR>

From the above I need to fetch only Firstname, lastname, address1.

Any help is really appreciated.

Rgds,
Sindbaad

"Herfried K. Wagner [MVP]" wrote:
"Sindbaad" <si******@gmail.com> schrieb:
I have a requirement where in I need to parse and get all the HTML and
custom specific tags from the HTML page.

I'm using mshtml and vb.net.


What doesn't work with MSHTML?
One way i thought off was to use the regex
functions. Can I know what is the best way to parse and fetch all the tags
or
if any one has worked on already can help me out so that I don't need to
reinvent the wheel.


..NET Html Agility Pack: How to use malformed HTML just like it was
well-formed XML...
<URL:http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx>

Download:

<URL:http://www.codefluent.com/smourier/download/htmlagilitypack.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

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

Similar topics

8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
14
by: Viktor Rosenfeld | last post by:
Hi, I need to create a parser for a Python project, and I'd like to use process kinda like lex/yacc. I've looked at various parsing packages online, but didn't find anything useful for me: -...
9
by: RiGGa | last post by:
Hi, I want to parse a web page in Python and have it write certain values out to a mysql database. I really dont know where to start with parsing the html code ( I can work out the database...
0
by: Fuzzyman | last post by:
I am trying to parse an HTML page an only modify URLs within tags - e.g. inside IMG, A, SCRIPT, FRAME tags etc... I have built one that works fine using the HTMLParser.HTMLParser and it works...
3
by: Willem Ligtenberg | last post by:
I decided to use SAX to parse my xml file. But the parser crashes on: File "/usr/lib/python2.3/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError raise exception...
16
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed...
1
by: yonido | last post by:
hello, my goal is to get patterns out of email files - say "message forwarding" patterns (message forwarded from: xx to: yy subject: zz) now lets say there are tons of these patterns (by gmail,...
4
by: Rick Walsh | last post by:
I have an HTML table in the following format: <table> <tr><td>Header 1</td><td>Header 2</td></tr> <tr><td>1</td><td>2</td></tr> <tr><td>3</td><td>4</td></tr> <tr><td>5</td><td>6</td></tr>...
9
by: ankitdesai | last post by:
I would like to parse a couple of tables within an individual player's SHTML page. For example, I would like to get the "Actual Pitching Statistics" and the "Translated Pitching Statistics"...
4
by: Neil.Smith | last post by:
I can't seem to find any references to this, but here goes: In there anyway to parse an html/aspx file within an asp.net application to gather a collection of controls in the file. For instance...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...

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.