2 Replies Latest reply on Mar 3, 2014 1:05 AM by dvohra21

    XPath Question

    JP

      Hi,

       

      I have a question regarding XPath. Let's say I have the below XML, I want to get only the first leaf element that has a value of c. I tried to use /tree/branch/leaf[leaf = "c"] but its getting both. any help?

       

      <tree>

        <branch>

        <leaf>a</leaf>

        <leaf>c</leaf>

        <leaf>c</leaf>

        </branch>

      </tree>