Copied to clipboard

Flag this post as spam?

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


  • owen 8 posts 21 karma points
    May 18, 2009 @ 10:16
    owen
    0

    When inside a for-each loop how to test if a node has children?

    Hi guys, just trying to create a nested UL list that nests the children of the top level nodes, but can't work out the xpath syntax to use in the "if test" statement, and the nested for-each statement. Your help would be much appreciated.

    eg;
    [code]






    [/code]

  • Tim Geyssens 1060 posts 27 karma points
    May 18, 2009 @ 10:30
    Tim Geyssens
    0

    Hi you can do that with:

    count(./node) > 0

  • owen 8 posts 21 karma points
    May 18, 2009 @ 12:50
    owen
    0

    thanks Tim.

  • 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