There was a compatibility issue with JDOM b10, which I have just now fixed.

Thank you very much for reporting it.

- Dmitri

----- Original Message ----- 
From: "Christian Ruess" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 03, 2004 4:35 AM
Subject: jxpath problem with jdom and setValue


>
>  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.setValueJXPathContex
tReferenceImpl.java:385)         at
>
>
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.setValue(JXPathConte
xtReferenceImpl.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]
>
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to