Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-369

selectPath with XMLBeans engine returns incorrect results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Version 2.3
    • Version 2.3.1
    • XPath
    • None

    Description

      The XML:
      <a>
      <b>
      <c>val1</c>
      <d>
      <c>val2</c>
      </d>
      </b>
      <c>val3</c>
      </a>

      If I execute the following XQuery: .//b/c
      I would expect one result to come back, however, using xmlbeans 2.3, it seems to select the val2 c as well!?

      The test class:
      public class TestSelectPath {
      public static void main(String[] args)

      { final XmlObject obj = XmlObject.Factory.parse("<a><b><c>val1</c><d><c>val2</c></d><c>val3</c></a>"); final XmlCursor c = obj.newCursor(); c.selectPath(".//b/c"); System.out.println(c.getSelectionCount()); c.dispose(); }

      }

      Attachments

        Activity

          People

            cezar Cezar Cristian Andrei
            radup Radu Preotiuc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: