If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
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, 12: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, 13:20
rhs98 rhs98 is offline
Super Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 441
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

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