I reviewed that page extensively and found a reference to using the namespace

http://camel.apache.org/xml/variables/system-properties

What I am really looking for is an example that shows if it is possible to
use a variable in the Xpath expression.

So in Java I do the following:  System.setProperty("MY_PROP", "MY_VALUE");

Then I define the system-property namespace and give it a prefix of "sys".  

What would the resulting Xpath expression look like?  Below are the examples
I tried with no luck.

<camel:filter>
   <camel:xpath>/myns:SomeTag = ${sys.MY_PROP}</camel:xpath>
</camel:filter>

AND

<camel:filter>
   <camel:xpath>/myns:SomeTag = sys:MY_PROP</camel:xpath>
</camel:filter>





Claus Ibsen-2 wrote:
> 
> Hi
> 
> See this wiki page
> http://camel.apache.org/xpath
> 
> that may help a bit.
> 
> 
> 
> On Mon, Nov 2, 2009 at 10:11 PM, bhusted <bhus...@yahoo.com> wrote:
>>
>> Is it possible to refer to a Java System property in a camel:xpath
>> filter?
>>
>> For example:
>>
>> <camel:filter>
>>   <camel:xpath>/myns:SomeTag = ${sys.SomeSystemProp}</camel:xpath>
>> </camel:filter>
>>
>>
>> Any suggestions if this isn't possible for combining xpath and expression
>> language would be REALLY helpful.
>>
>> Thanks
>> --
>> View this message in context:
>> http://old.nabble.com/Use-sys.property-in-xpath-filter-tp26157832p26157832.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Use-sys.property-in-xpath-filter-tp26157832p26284380.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to