4 Replies - 4570 Views - Last Post: 05 April 2009 - 05:15 AM Rate Topic: -----

#1 sachin635  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 26
  • Joined: 10-September 08

Reading HTML data and writing to a text file?

Post icon  Posted 03 April 2009 - 07:31 AM

Hi,
I just want to read the table data in a HTML file and Write as it is into a text file as it viewed in HTML view, I mean I don't want retrieve the soucrce code, but I want the text as well as empty spaces between each table cell in the text file also.
How can I do this in c#?


If I read the table data which is present in the HTML page in the following way:
he following figure shows how the table defined in this example renders. Rendered table.



after reading this table from html page, how to write in a text file such that the table's content should be renderd in same manner in the text file also.

Is This A Good Question/Topic? 0
  • +

Replies To: Reading HTML data and writing to a text file?

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Reading HTML data and writing to a text file?

Posted 03 April 2009 - 07:46 AM

Show us the code you're written to accomplish this :)
Was This Post Helpful? 0
  • +
  • -

#3 sachin635  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 26
  • Joined: 10-September 08

Re: Reading HTML data and writing to a text file?

Posted 03 April 2009 - 07:59 AM

I doesn't hav any code...
I want some suggestion, such that I should retrieve as it is as it displayed while opened on HTML file.
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,441
  • Joined: 23-August 08

Re: Reading HTML data and writing to a text file?

Posted 03 April 2009 - 08:20 AM

You're not showing us in your post what you're aiming to do, but if I understand correctly, what you're looking to do is likely in no way easy.

You need to get the HTML (easy), parse it (not easy for HTML), and write to the file as you want it formatted, based on how it's parsed.
Was This Post Helpful? 0
  • +
  • -

#5 sachin635  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 26
  • Joined: 10-September 08

Re: Reading HTML data and writing to a text file?

Posted 05 April 2009 - 05:15 AM

consider the following Image data as a table element's content in the HTML page. I want to read this html page (which will be on my desktop) data and it should be saved in a file such that the file content should be visible as it is that of in HTML page.

Attached image(s)

  • Attached Image

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1