[jdom-interest] Can't get values using xpath

John Hurst jbhurst at attglobal.net
Fri Oct 24 18:59:38 PDT 2003


The problem seems to be in the way you are dealing with namespaces.

I got your code to work in two different ways:

1) Remove the namespace declarations from the XML string.

2) Modify the XML document, and the XPath expression, to put a namespace
prefix in, e.g.:

xmlns:x='http://nc3pc4.sch.advantis.com/XMLSchema/API'	...


      String RET = getProperty(pvcDocA,

BTW, the code you posted doesn't compile -- you have 

	public static String oneXml = ...

but in main() you name the field testXml.


John Hurst

-----Original Message-----
From: jdom-interest-admin at jdom.org [mailto:jdom-interest-admin at jdom.org] On
Behalf Of Abhijeet Sarwate
Sent: Saturday, 25 October 2003 05:41
To: jdom-interest at jdom.org
Subject: [jdom-interest] Can't get values using xpath


I use Jaxen's XPath engine to  get data out of xml

here is the xml that I use

<?xml version='1.0' encoding='ISO-8859-1'?>
    <APIInterface xmlns='http://nc3pc4.sch.advantis.com/XMLSchema/API' 



abhijeet sarwate

To control your jdom-interest membership:

More information about the jdom-interest mailing list