xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "s.k.i." <sylvia.is...@gmail.com>
Subject XmlBeans with XQuery Troubles
Date Sat, 30 Aug 2008 16:49:50 GMT

 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: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Mime
View raw message