[jdom-interest] Xpath element returning NULL

Elliotte Harold elharo at metalab.unc.edu
Wed Jun 22 02:37:45 PDT 2005


Anand, Rajesh wrote:
> 
> 
>         Folks,
> 
>         Can someone help please.
> 
>         I'm trying to locate this element, code snippet…
> 
>        * Element element1 = (Element) XPath.selectSingleNode(pf.doc, 
> "SOAP-ENV:Envelope/SOAP-    
> ENV:Body/getIndex:IndexServiceRequest/getIndex:EndDate");*
> 


Did you set a namespace context? You need one for that query.

-- 
Elliotte Rusty Harold  elharo at metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim


More information about the jdom-interest mailing list