Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Scrape that screen with LINQ

        Beth Massi has done something I know some of you C4F readers have been asking for.  Beth developed a quick and easy way to query a web site with LINQ to XML.  One of the commenter pointed out also you can do a HTML to XHTML conversion with this tool.

The trick to doing this is loading the HTML into an XElement, from there you strip out the unsupported XML entities, THEN LINQ the HTML to get the data you wanted.

Beth, the 15 minutes this took you just saved the Internet days of work on what I'd be would be a far more complex solution.


Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • leblanc menesesleblanc meneses


    . This seemed like the perfect opportunity to use LINQ to XML because the structure of the page was pretty well formed HTML.

    if it was well formed you should have captured your section and used xslt to do the transformation.

    if its malformed.. you need to learn regex!!!!! period.

    what a waste of time...  

  • Clint RutkasClint I'm a "developer"

    Not every solution can be solved with RegEx or XSLT.

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.