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
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