Copied to clipboard

Flag this post as spam?

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


  • Johan Möller 83 posts 137 karma points
    May 24, 2010 @ 09:33
    Johan Möller
    0

    How to use the xPathNodeIterator

    Continuing on the thread http://our.umbraco.org/forum/developers/xslt/9236-creating-a-getxmlnodebyid-alike-function-for-custom-section 

    i woud like to know how to use the xPathNodeIterator in my xsltextension to list my products from an external table in the umbraco database. Is there any good guides, examples, blogposts or documentation on how to do this?

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    May 24, 2010 @ 10:06
    Dirk De Grave
    1

    A wiki article on using xslt extension, returning an XPathNodeIterator and use in your xslt can be found here.

     

    Hope this helps.

    Regards,

    /Dirk

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    May 24, 2010 @ 10:11
    Lee Kelleher
    0

    Hi Johan,

    You could try using the SQL for XSLT extension for a quick-and-easy solution?

    For a code example, I put up a snippet on the wiki a while back:

    http://our.umbraco.org/wiki/reference/code-snippets/getlanguages

    It doesn't call the database, but the general idea is that you get the data from wherever, put it into an XML document and then create an XPathNodeIterator from it.

    return xd.CreateNavigator().Select("/");

    Cheers, Lee.

  • Johan Möller 83 posts 137 karma points
    May 24, 2010 @ 14:26
    Johan Möller
    0

    Dirk: Thanks just what i was looking for.

    Lee: Wont be using it for this project but it looks like something that might be usefull in the future :)

  • 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