xpath query

  • Please help!!!

    <a>

        <b>bar</b>

        <b>bar</b>

        <b>foo</b>

        <b>bar</b>

    </a>

    With reference to the above XML. Taking a/b[4] as the context node,

    desbribe an XPath that returns a node-set containing the first b

    element

    in reverse document order that contains the same text node as the

    current

    context.

  • preceding-sibling::node()[text()=following-sibling::node()/text()][1]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply