Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert html tables to xml

Status
Not open for further replies.

infinitelo

Programmer
Mar 7, 2001
319
you ever get the feeling your doing something the hard way?

Ive been working with some html reports that contain tables, and would like to strip them out and put them into xml so i can put them into a data grid.

The way im doing it now goes like this
read file (one char at a time)
if current string = "<" then
ismarkup = "true"
...
end if
if current string = ">" then
ismarkup = "false"
...
end if
if markupstring = "<table>" then
keep = "true"
...
end if
if markupstring = "</table>" then
keep = "false"
...
end if
if keep = "true" then
output = output & newchar
...
end if

what i end up with goes like
<table>
<tr>
<td>
info
</td>
<td>
info 2
</td>
<tr>
<td>
infodata
</td>
<td>
infodata2
</td>
</table>
ect....
which all takes about 10 seconds to run on each report
im just not sure what the next step is to put this in a
data grid.


if it is to be it's up to me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top