473,385 Members | 1,518 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Convert <table> from HTML text file to datatable

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.
Jul 21 '05 #1
4 6803
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
"js" <js@noemail.com> wrote in message
news:u0*************@tk2msftngp13.phx.gbl...
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.

Jul 21 '05 #2
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.)
"js" <js@noemail.com> wrote in message
news:u0*************@tk2msftngp13.phx.gbl...
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.

Jul 21 '05 #3
js
ok,thanks...i'll write the code myself. I need the code to extract data from
our legacy reporting website.

"Sahil Malik" <co*****************@nospam.com> wrote in message
news:e6**************@TK2MSFTNGP11.phx.gbl...
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
Jul 21 '05 #4
Dude, I just had a brainwave in the shower this morning.

You could do a Web Query from Excel, and then you could export that easily
to a data table. You can even write a macro to do this. :)

- Sahil Malik
http://www.dotnetjunkies.com/weblog/sahilmalik

"js" <js@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
ok,thanks...i'll write the code myself. I need the code to extract data from our legacy reporting website.

"Sahil Malik" <co*****************@nospam.com> wrote in message
news:e6**************@TK2MSFTNGP11.phx.gbl...
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

Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bjam | last post by:
Hi, I am trying to do the following, which is to have a single place to define my table paramaters such as cellpadding / cellspacing etc. Below is the code I am trying to achieve see the cell...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
19
by: CMAR | last post by:
I have the following markup. The problem is that the browser, e.g., IE6, inserts several lines of blank space between the <div> and the following table. Is there a way to minimize that vertical...
2
by: listaction | last post by:
Hi Folks, can you help me by explaining how the code below can be translated using <div> and achieve the same effect? Thanks, LA <html> <body> <table bgcolor="#000000" width="100%"...
8
by: ASP Yaboh | last post by:
I have an ArrayList of data gathered from a database. I want to create a web page from this data by creating a <table>, each cell in each row displays the appropriate data. One of those cells in...
4
by: js | last post by:
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...
13
by: Davo | last post by:
Hi Folks, There seems to be something about not using tables for layout, but use divs instead. I'm not sure if I've got this right. If the output looks like what you want, then it shouldn't...
12
by: slartybartfast | last post by:
I'm new(ish) to css, comfortable using tables, but trying real hard to move away. Please see http://84.9.125.31/developer/css_test/test5.html NB This issue is with IE & Opera - I've tried IE...
3
by: PYG | last post by:
Hi everybody I have a simple question : If i use this code : <body style="font-size:24px;color:blue;"> Text in body <table> <tr><td> Text in table
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.