commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WHIRLYCOTT <p...@whirlycott.com>
Subject JXPath problem and question
Date Sun, 11 Jul 2004 14:28:53 GMT
I'm using JXPath for some read only work right now and it's quite 
helpful.  However, now that I'm trying to do some writes to a simple 
bean with a JDOM Document inside it, things are starting to get 
trickier.  I'm using a JXPath nighly build from a few days ago.

I've attached a short sample of what I'm trying to do in the hope that 
someone can take a look at it and guide me.

In essence, I'm having trouble using the context.setValue() method and 
I'm getting exceptions like this:

org.apache.commons.jxpath.JXPathException: Exception trying to set value 
with xpath /dataXML/address/street; 
org.jdom.Element.addContent(Lorg/jdom/Text;)Lorg/jdom/Element;
	at 
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.setValue(JXPathContextReferenceImpl.java:421)
	at 
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.setValue(JXPathContextReferenceImpl.java:412)
	at com.whirlycott.samples.JXPathTest.main(JXPathTest.java:35)
Exception in thread "main"

Thanks in advance,
phil.

-- 
                                   Whirlycott
                                   Philip Jacob
                                   phil@whirlycott.com
                                   http://www.whirlycott.com/phil/

Mime
View raw message