I am having difficulty getting selectPath() and executeQuery() to work on a
very simple xml example.
The following small example sums up my problem.
In the following code, I would expect 'result = test' to print.
String doc = " <test/> ";
query = "/a/test";
try{
XmlObject xml = XmlObject.Factory.parse(doc);
XmlCursor cursor = xml.newCursor();
cursor.push();
cursor.selectPath(query);
System.out.println("result = " +cursor.getTextValue());
}catch(Exception e){
System.out.println(e.getMessage());
}
However, 'result =' indicating that selectPath() returns nothing.
My runtime classpath contains the following xmlbeans and saxon related
entries:
xbean.jar
jsr173_1.0_api.jar
xbean-xpath.jar
saxon9.jar
saxon9-xqj.jar
saxon9-dom.jar
xmlbeans version is 2.4
saxon version is 9.0.0.4j
Can someone give me some pointers as to what I may have done wrong or how I
should go about resolving this issue?
Thanks,
ski
--
View this message in context:
http://www.nabble.com/XmlBeans-with-XQuery-Troubles-tp19235072p19235072.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]