[jdom-interest] problem with xpath
laurent.bihanic at atosorigin.com
Tue Aug 19 01:04:16 PDT 2003
prashant sharma wrote:
> I want to get the element ns1:asonReplyMessage0000_MSG. I was using
> xpath explorer to find out the xpath expression of the elements and
> xpath explorer gives the xpath expression as
> /Workspace/GetLocationInfo/Reply/ns1:asonReplyMessage0000_MSG. When I
> use this xpath expression in my code, it doesn't returns any element
> from the document. What am I doing wrong. Maybe I am not specifying the
> xpath expression correctly. Can someone help me.
You need to declare the namespace prefix ns1 to the XPath engine, using the
Note that XPath does not care about the prefix used in the document or whether
a prefix is being used.
Thus, the namespace prefix you declare in the XPath expression doesn't have to
More information about the jdom-interest