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

Simple XPath not working

    XMLWordPrintableJSON

Details

    Description

      I try and run this:

      Document.selectPath("//event-ref");

      for this xml:

      ...
      <event-refs>
      <event-ref id=".."/>
      </event-refs>

      and get this trace:

      java.lang.RuntimeException: Path too complex for xmlbeans: //event-ref
      at org.apache.xmlbeans.impl.newstore2.Path.getCompiledPath(Path.java:156)
      at org.apache.xmlbeans.impl.newstore2.Path.getCompiledPath(Path.java:89)
      at org.apache.xmlbeans.impl.newstore2.Cursor._selectPath(Cursor.java:860)
      at org.apache.xmlbeans.impl.newstore2.Cursor.selectPath(Cursor.java:2588)
      at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:427)
      at org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:411)

      I have xbean_xpath.jar (2.0 beta 1), saxon8-xpath.jar, and xbean.jar on my classpath. It doesn't even look like it's using the saxon xpath api at all. What could be the problem?

      Attachments

        Activity

          People

            Unassigned Unassigned
            punnooser Roshan Punnoose
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: