camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulliard <cmoulli...@gmail.com>
Subject Re: Unmarshall a part of a XML file using JAXB
Date Tue, 08 Jul 2008 14:29:27 GMT

Can I use a filter inside a choice().when() after a xpath evaluation ?

from("").choice()
.when.xpath("", ns)
        .setHeader("name").xpath("", ns)
        .filter().xquery("", ns)
        .unmarshall()
        .to("")
.otherwise().to("");

Apparently, this is not possible !


James.Strachan wrote:
> 
> 2008/7/8 cmoulliard <cmoulliard@gmail.com>:
>>
>> Hi,
>>
>> Is it possible through the routing to tell the processor that I want to
>> unmarshall a part of the XML file parsed ?
>>
>> Idea :
>>
>> From("File:///c:/temp/test)
>> .extract(xpath(//NodeSearched/*)
>> .unmarshall(jaxb)
>> .to("bean:transform)
> 
> you could write custom Java for this in a bean, or use an XQuery
> transform; then call
> 
> unmarshal().jaxb()
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Unmarshall-a-part-of-a-XML-file-using-JAXB-tp18340217s22882p18340561.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message