Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sjors Pals 617 posts 270 karma points
    Dec 02, 2010 @ 16:00
    Sjors Pals
    0

    Retrieve unescaped data from Document Field

    I have the following issue, i want to retrieve all anchors from a richtext field using a xpath query, problem is that when i retrieve the document, the innercontent of a field has esaceped xml, is there a way to get the "raw" xml so i can apply a xpath query on it?

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Dec 03, 2010 @ 06:31
    Richard Soeteman
    3

    Can't you just get the string value and use the HTMLAgilitypack for that?

    Load content in HtmlDocument and use the following xpath

    htmlDocument.DocumentNode.SelectNodes(

     

    "//a[@href]");

  • Sjors Pals 617 posts 270 karma points
    Dec 09, 2010 @ 17:01
    Sjors Pals
    0

    Super, did not know what happened but at first it did not work, but now its magically working :)

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Dec 09, 2010 @ 17:09
    Richard Soeteman
    0

    HtmlAgilitypack is magic :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies