Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Parsing HTML with asp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-02-03, 13:06
Mustang Mustang is offline
Registered User
 
Join Date: May 2003
Posts: 1
Question Parsing HTML with asp

I need to parse an HTML page and gather information on it and store it into an Access Database. Here is an example of the HTML I need to parse.
<TD ALIGN="CENTER">
<font face='Arial,Helvetica,Sans Serif' color='#000055' size='2'/>
<!--NNNNNNNNNNNNNNNN-->01456353</FONT></TD>
<!-- END SMU--><TD align="left"><font face='Arial,Helvetica,Sans Serif' color='#000055' size='2'/><B />&nbsp;
<!--NNNNNNNNNNNNNNNN-->Thomas,Halle Michele</TD>
<TD align="center"><font face='Arial,Helvetica,Sans Serif' color='#000055' size='2'/><B /><!--NNNNNNNNNNN-->Enrolled</TD>

I need the ID number after the <!--NNNNNNNNNNNNNNNN--> and I need
the student name after the second <!--NNNNNNNNNNNNNNNN-->

Does anyone have any idea on how to parse this information and store it into the database?
Reply With Quote
  #2 (permalink)  
Old 05-02-03, 14:20
rhs98 rhs98 is offline
Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 440
Yes,

You need to use regular expressions to match the content inbetween the tags.

I don't have time to explain how to do this as I am too busy. Just search on google for regular expressions and their use in ASP.

I use them for similar purposes on my site.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On