Home All Groups Group Topic Archive Search About

How can I create a HTMLTable class from and HTML string.

Author
16 Feb 2006 2:59 PM
chambersdon
I have an XMLReader loaded the HTML from a web page.  I want to pull a
Table out of this XMLReader and use it to create an
HTMLControls.HTMLTable object.
How can I do this?

I should be able to do it without parsing the sting and explicitly
creating every row and column.  This should work as if the table was
created in the designer using the runat=server attribute.

Don

Author
16 Feb 2006 5:21 PM
DWS
I decided it was unethical but to get you rollin.

xmlreader.ReadToFollowing("table")
dim s as string
s = xmlreader.ReadElementContentAsString()
how you get s into a table is up to you.  I think its the table inner html
and you can just set it mynewhtmltable.innerhtml = s you still have to walk
the attributes in node.  table might be upper case too and the table node
would not be found.  It might not even work at all.

Good Luck
DWS

Show quoteHide quote
"chambers***@hotmail.com" wrote:

> I have an XMLReader loaded the HTML from a web page.  I want to pull a
> Table out of this XMLReader and use it to create an
> HTMLControls.HTMLTable object.
> How can I do this?
>
> I should be able to do it without parsing the sting and explicitly
> creating every row and column.  This should work as if the table was
> created in the designer using the runat=server attribute.
>
> Don
>
>