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 >> using variables
Date Sun, 20 Mar 2005 04:27:01 GMT
Augusto,

Here's how you can do it:

   context.setValue("/property", context.getValue("$property"));

I hope this helps.

- Dmitri


----- Original Message ----- 
From: "augusto callejas" <callejas.dev@gmail.com>
To: <commons-user@jakarta.apache.org>
Sent: Saturday, March 19, 2005 1:36 PM
Subject: jxpath >> using variables


> hi-
> 
> i want to use variables in this way:
> 
> JXPathContext context = JXPathContext.newContext(bean);
> context.getVariables().declareVariable("property", new Integer(2));
> context.setValue("/property", "$property");
> 
> that is, i want to reference a variable as part of the value,
> not just as part of the reference in a getValue() call.
> 
> is this currently not supported?
> 
> thanks,
> augusto.
> 
> ---------------------------------------------------------------------
> 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