commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Plotnikov" <dmi...@apache.org>
Subject Re: jxpath problem with jdom and setValue
Date Thu, 04 Mar 2004 01:02:18 GMT
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" <cruess@gmx.de>
To: <commons-user@jakarta.apache.org>
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: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message