Copied to clipboard

Flag this post as spam?

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


  • Peter Svensson 2 posts 22 karma points
    Jan 14, 2011 @ 13:17
    Peter Svensson
    0

    Help with XPATH needed

    Hi All,

    I'm in need for some help with a xpath-expression and I'm hoping that someone could point me in the right direction. I've attached the following screenshot:

    What I'm looking for is the xpath to search in any of the "stu---"nodes (DocumentType: X) when located in the "search"-node. I'm on version 4.5.2.

    Thanks in advance! // Peter

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 14, 2011 @ 14:03
    Matt Brailsford
    0

    Hey Peter,

    If you "stu---" nodes are the only nodes to user DocumentType X, you could do something like this?

    $currentPage/ancestor::root//*[name() = 'X' and @isDoc]

    Which basically says, from the current page, travel to the root node, then find any decendants (at any level) which are documents, and which use the X document type.

    Matt

  • Peter Svensson 2 posts 22 karma points
    Jan 14, 2011 @ 14:48
    Peter Svensson
    0

    Thanks! Works like a charm / Peter

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 14, 2011 @ 14:50
    Matt Brailsford
    0

    Excellent.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft