Manipulate HTML string as DOM

Discussion in 'ASP .Net' started by Mike Gleason jr Couturier, Mar 28, 2008.

  1. (.NET 2.0, C#, VS 2005)

    Hi,

    I have a string representing a web page file.

    I want to convert the string into an object to navigate through it's
    elements.

    I tried XmlDocument but I get a parsing error on the string...

    Thanks
    Mike Gleason jr Couturier, Mar 28, 2008
    #1
    1. Advertising

  2. Mike Gleason jr Couturier

    bruce barker Guest

    you need an HtmlParser. .net does not supply one other than hosting IE (not
    recommended for an asp.net site).

    google HtmlParser for the toolkit of your choice. (most are in java though)


    -- bruce (sqlwork.com)


    "Mike Gleason jr Couturier" wrote:

    > (.NET 2.0, C#, VS 2005)
    >
    > Hi,
    >
    > I have a string representing a web page file.
    >
    > I want to convert the string into an object to navigate through it's
    > elements.
    >
    > I tried XmlDocument but I get a parsing error on the string...
    >
    > Thanks
    >
    >
    >
    bruce barker, Mar 28, 2008
    #2
    1. Advertising

  3. Look into Simon Mourier's HtmlAgilityPack. It provides an XML-DOM like
    HtmlDocument class that does what Bruce said. Find it on codeplex.com
    -- Peter
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short Urls & more: http://ittyurl.net


    "Mike Gleason jr Couturier" wrote:

    > (.NET 2.0, C#, VS 2005)
    >
    > Hi,
    >
    > I have a string representing a web page file.
    >
    > I want to convert the string into an object to navigate through it's
    > elements.
    >
    > I tried XmlDocument but I get a parsing error on the string...
    >
    > Thanks
    >
    >
    >
    Peter Bromberg [C# MVP], Mar 28, 2008
    #3
  4. "Mike Gleason jr Couturier" <> a écrit dans le message
    de news: %...
    > (.NET 2.0, C#, VS 2005)
    >
    > Hi,
    >
    > I have a string representing a web page file.
    >
    > I want to convert the string into an object to navigate through it's
    > elements.
    >
    > I tried XmlDocument but I get a parsing error on the string...
    >
    > Thanks
    >


    Thanks a lot guys!

    Mike
    Mike Gleason jr Couturier, Mar 28, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff
    Replies:
    3
    Views:
    647
    Bucko
    Nov 2, 2003
  2. Replies:
    0
    Views:
    534
  3. Dave
    Replies:
    1
    Views:
    313
    Mike Wahler
    Jan 22, 2005
  4. Chris
    Replies:
    1
    Views:
    541
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Oct 3, 2007
  5. DOM ? HTML DOM

    , Dec 19, 2007, in forum: Javascript
    Replies:
    1
    Views:
    109
Loading...

Share This Page