[jdom-interest] problem with xpath
prashant sharma
prash_sharma at yahoo.com
Mon Aug 18 14:59:22 PDT 2003
Hi,
I am having a problem getting an element from a document based upon the namespace. The document looks like
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Workspace>
<RetrieveLocationInfoByAddressRequest>
<Address>
<house_number>8000</house_number>
</Address>
</RetrieveLocationInfoByAddressRequest>
<GetLocationInfo>
<Reply>
<ns1:asonReplyMessage0000_MSG xmlns:ns1="http://www.omg.org/IDL-MAPPED">
<ns1:e911Sur>O9</ns1:e911Sur>
<ns1:e911Exempt>EX</ns1:e911Exempt>
<ns1:e911Nrg></ns1:e911Nrg>
<ns1:operSur4Ind></ns1:operSur4Ind>
</ns1:asonReplyMessage0000_MSG>
</Reply>
</GetLocationInfo>
</Workspace>
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.
thanks
Prashant
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030818/5931ea69/attachment.htm
More information about the jdom-interest
mailing list