How to strip XML from a webpage

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • james

    #1

    How to strip XML from a webpage

    Hi, I've written a small application that reads Weather data from a couple
    of different websites (depending on the user's choice) and then scrolls the
    data ( current temp. forecast etc.) on the system tray. The problem I am
    encountering is the text includes the html or xml in the string and I would
    like to filter it out and display only the weather data itself.
    james


  • Herfried K. Wagner [MVP]

    #2
    Re: How to strip XML from a webpage

    "james" <jjames700REMOV EME@earthlink.n et> schrieb:[color=blue]
    > Hi, I've written a small application that reads Weather data from a
    > couple of different websites (depending on the user's choice) and then
    > scrolls the data ( current temp. forecast etc.) on the system tray. The
    > problem I am encountering is the text includes the html or xml in the
    > string and I would like to filter it out and display only the weather data
    > itself.[/color]

    Parsing an HTML file:

    MSHTML Reference
    <URL:http://msdn.microsoft. com/library/default.asp?url =/workshop/browser/mshtml/reference/reference.asp>

    - or -

    ..NET Html Agility Pack: How to use malformed HTML just like it was
    well-formed XML...
    <URL:http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx>

    Download:

    <URL:http://www.codefluent. com/smourier/download/htmlagilitypack .zip>

    - or -

    SgmlReader 1.4
    <URL:http://www.gotdotnet.c om/Community/UserSamples/Details.aspx?Sa mpleGuid=B90FDD CE-E60D-43F8-A5C4-C3BD760564BC>

    If the file read is in XHTML format, you can use the classes contained in
    the 'System.Xml' namespace for reading information from the file.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • james

      #3
      Re: How to strip XML from a webpage

      Thank you Herfried! Those links are what I was looking for. Sometimes, it
      takes another pair of eyes to find the answers.
      james

      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
      news:%23q88fHXl GHA.4888@TK2MSF TNGP02.phx.gbl. ..[color=blue]
      > "james" <jjames700REMOV EME@earthlink.n et> schrieb:[color=green]
      >> Hi, I've written a small application that reads Weather data from a
      >> couple of different websites (depending on the user's choice) and then
      >> scrolls the data ( current temp. forecast etc.) on the system tray. The
      >> problem I am encountering is the text includes the html or xml in the
      >> string and I would like to filter it out and display only the weather
      >> data itself.[/color]
      >
      > Parsing an HTML file:
      >
      > MSHTML Reference
      > <URL:http://msdn.microsoft. com/library/default.asp?url =/workshop/browser/mshtml/reference/reference.asp>
      >
      > - or -
      >
      > .NET Html Agility Pack: How to use malformed HTML just like it was
      > well-formed XML...
      > <URL:http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx>
      >
      > Download:
      >
      > <URL:http://www.codefluent. com/smourier/download/htmlagilitypack .zip>
      >
      > - or -
      >
      > SgmlReader 1.4
      > <URL:http://www.gotdotnet.c om/Community/UserSamples/Details.aspx?Sa mpleGuid=B90FDD CE-E60D-43F8-A5C4-C3BD760564BC>
      >
      > If the file read is in XHTML format, you can use the classes contained in
      > the 'System.Xml' namespace for reading information from the file.
      >
      > --
      > M S Herfried K. Wagner
      > M V P <URL:http://dotnet.mvps.org/>
      > V B <URL:http://classicvb.org/petition/>[/color]


      Comment

      Working...