Convert <table> from HTML text file to datatable

  • Thread starter Thread starter js
  • Start date Start date
J

js

I'm just wondering if anyone have come across a code that reads an html
file,search for <table> tag and convert its contents into a datatable and
save it into a dataset.If there are few html tables,then each will be
converted into a datatable and added into the same dataset.

thanks.
 
Unless the html isn't pure XHTML, you won't find code to do this conversion.

If it indeed is pure XHTML, then you don't need code, you just need to
specify an XSD, and read in the XML (Which is your table HTML), and bingo
you have datatables.

- Sahil Malik
You can reach me thru my blog http://www.dotnetjunkies.com/weblog/sahilmalik
 
No. An HTML table is not the same thing as a .NET DataTable (apples and
oranges).

HTML tables don't support any database features (datatypes, length
restrictions, etc.)
 
ok,thanks...i'll write the code myself. I need the code to extract data from
our legacy reporting website.

Sahil Malik said:
Unless the html isn't pure XHTML, you won't find code to do this conversion.

If it indeed is pure XHTML, then you don't need code, you just need to
specify an XSD, and read in the XML (Which is your table HTML), and bingo
you have datatables.

- Sahil Malik
You can reach me thru my blog
http://www.dotnetjunkies.com/weblog/sahilmalik
 
Back
Top