On Wed, May 20, 2009 at 2:39 PM, Nasim Anza <[email protected]> wrote:
> Hi,
>
> I would like to get a list of values from an XML input using the Camel
> route.
> Assume that we have an XML input like below :
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:ns="http://myNamesapce";>
>   <soapenv:Header/>
>   <soapenv:Body>
>      <ns:Addresses>
>         <Address>address1</Address>
>         <Address>address2</Address>
>         <Address>address3</Address>
>         <Address>address4</Address>
>      </ns:Addresses>
>   </soapenv:Body>
> </soapenv:Envelope>
>
> How to get the list of address values from a Camel Processor within a route
> :
>
> from("direct:start")
> .setProperty("Addresses").xpath("//Address", ArrayList.class)
> .process(myCamelProcessor);
Hi

Have you tried without the ArrayList.class as the xpath is kind hard
to get working. As it tends to want to use XML types such as NodeList
etc.



>
> Thanks for help
>
> Nasmo
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to