Uploaded image for project: 'Commons JXPath'
  1. Commons JXPath
  2. JXPATH-18

createPathAndSetValue fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 1.1 Final
    • None
    • None
    • Operating System: other
      Platform: All

    • 27401

    Description

      jXPathContext.createPathAndSetValue("/element1/element2/1_numberelement","val"));
      fails with the following error:

      org.apache.commons.jxpath.JXPathException: Invalid XPath:
      '/element1/element2/1_numberelement'. Syntax error after: '/element1/element2/'
      at org.apache.commons.jxpath.ri.Parser.parseExpression(Parser.java:106)
      at
      org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.compileExpression(JXPathContextReferenceImpl.java:248)
      at
      org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPathAndSetValue(JXPathContextReferenceImpl.java:421)

      This does not happen when I rename the path to "/element1/element2/numberelement_1".

      Gtx,
      Thomas

      Attachments

        Activity

          People

            Unassigned Unassigned
            toemmi Thomas Mathis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: