[ 
http://issues.apache.org/jira/browse/WSCOMMONS-41?page=comments#action_12436493 
] 
            
Toshiro Takase commented on WSCOMMONS-41:
-----------------------------------------

In my understanding, it seems that the XPath works fine in the XPathTest2.
In testAbsolutePath(), "/elem1" does not select any nodes. That is correct, I 
think.

In XPath, starting from "/" means the document root.
So, in this case, the root element is soap envelope, that is not "elem1".

If you would like to select "elem1" element, the following XPaths would work.
                String XPathString = "/*/*/elem1";
                String XPathString = ".";
                String XPathString = "../elem1";
The following XPath selects "elem2".
                String XPathString = "elem2";

-----
By the way, both "//elem1" and "/elem1" seem absolute location path in the 
XPath terms. :)
http://www.w3.org/TR/xpath#NT-AbsoluteLocationPath


> XPath lookup using a absolute path string fails, when done to the Payload of 
> a SOAP envelope
> --------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-41
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-41
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Chamikara Jayalath
>         Assigned To: Eran Chinthaka
>         Attachments: XPathTest2.java
>
>
> Will add a test case to explain this more.
> Basically an absolute XPath search does not find any results when the subject 
> is the payload of a SOAP envelope. But a relative search is passing.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to