to write the contents of web page to an XML file using c#,asp.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jai80
    New Member
    • Nov 2006
    • 30

    to write the contents of web page to an XML file using c#,asp.net

    Hi Friends,

    Is it Possible to write the contents of a webpage to an XML file using c#.net.
    A sample code snippet will be of great help.

    Also, i want to know how to read only those contents, from a text file that begins with a particular string ex: <div class=std>...
    eg:

    .....
    ....
    <div class='std'>Hel lo</div>
    ....
    <div class='std'>hai </div>
    ...

    so that the extracted contents will be like the one below.

    <div class='std'>Hel lo</div>
    <div class='std'>hai </div>

    thanks in advance for the help.
    jai
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by jai80
    Hi Friends,

    Is it Possible to write the contents of a webpage to an XML file using c#.net.
    A sample code snippet will be of great help.

    Also, i want to know how to read only those contents, from a text file that begins with a particular string ex: <div class=std>...
    eg:

    .....
    ....
    <div class='std'>Hel lo</div>
    ....
    <div class='std'>hai </div>
    ...

    so that the extracted contents will be like the one below.

    <div class='std'>Hel lo</div>
    <div class='std'>hai </div>

    thanks in advance for the help.
    jai
    It sounds like you need to create something that parses files looking for HTML tags. Have you seen this article?

    Try googling for HTML parsing techniques.

    -Frinny

    Comment

    Working...