Hello -
I get an exception trying when calling setValue() on JXPathContext from
JDOM document.
I reduced the problem in the example below and cited the exception.
Is this a bug or am I doing something wrong?
Please help / give a solution hint.
Thank you!
Christian
Element root=new Element("root"); // jdomv1.0-b10
Element subnode=new Element("subnode");
subnode.setText("1");
root.addContent(subnode);
Document result=new Document();
result.setRootElement(root);
JXPathContext jxpc=JXPathContext.newContext(result); // JXPATH 1.1
System.out.println("getValJXPC:
"+(String)jxpc.getValue("/root/subnode"));
try {
jxpc.setValue("/root/subnode","17");
} catch (Exception e) {
e.printStackTrace();
}
->
org.apache.commons.jxpath.JXPathException: Exception trying to set value
with xp
ath /root/subnode/.;
org.jdom.Element.addContent(Lorg/jdom/Text;)Lorg/jdom/Element;
at
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.setValueJXPathContextReferenceImpl.java:385)
at
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.setValue(JXPathContextReferenceImpl.java:376)
--
+++ NEU bei GMX und erstmalig in Deutschland: T�V-gepr�fter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]