Copied to clipboard

Flag this post as spam?

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


  • Nikolas van Etten 202 posts 162 karma points
    Mar 14, 2011 @ 00:18
    Nikolas van Etten
    0

    GetXmlNodeByCsv sorting

    I'm using this in combination with the Multi-Node Tree Picker, but it seems as the results are not parsed in the same way I send them. Anyone know how to deal with this? Is it a bug or am I missing something? When using the following XPath:

    $currentPage/ancestor-or-self::* [@isDoc and @level = 1]/descendant-or-self::* [@isDoc and contains(concat(',', concat($csv, ',')), concat(',', concat(@id, ',')))]

    I actually end up with the same result, so that's not doing the trick either! I also assume GetXmlNodeByCsv is faster so I prefer using that instead! 

    Come to think about it, I assume the same problem goes for GetXmlMediaByCsv, but I have not experienced this problem yet (probably due to I have not tried sorting images yet).

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Mar 14, 2011 @ 16:46
    Lee Kelleher
    0

    Hi Nikolas,

    Yes, there's an issue with the original "GetXmlNodeByCsv" method - it returned the nodes in the order as they are found in XML cache (usually by @sortOrder).

    For v2.1 (stable - due for release any day now), has an overload method that will persist the corrent order of the CSV ids:

    GetXmlNodeByCsv(string csv, bool persistOrder)

    The latest code is already up on CodePlex, so if you want it... go grab & compile the latest source code.

    Cheers, Lee.

Please Sign in or register to post replies

Write your reply to:

Draft