You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ashwin Karpe <as...@progress.com> on 2010/09/06 15:38:00 UTC

Re: Deserialising XML using XStream and Camel.

Hi,

Looks like there are 2 things here.

a> You will need to use the file component to load the XML file 
http://camel.apache.org/file.html http://camel.apache.org/file.html . For
e.g

        from("file:mydir/mysubdir").marshal().xstream().to(...)

b> You will need to pass an XStream Marshaller to the camel context if
needed (if the default is not something you can use)

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">

    <dataFormats>
        <xstream id="xstream-utf8" encoding="UTF-8"/>
    </dataFormats>

    <route>
        <from uri="file:mydir/mysubdir"/>
        <marshal ref="xstream-utf8"/>
        <to uri="mock:result"/>
    </route>

</camelContext>

-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
Progress Software Corporation
http://fusesource.com http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com.com
http://opensourceknowedge.blogspot.com 
---------------------------------------------------------
-- 
View this message in context: http://camel.465427.n5.nabble.com/Deserialising-XML-using-XStream-and-Camel-tp2804967p2804993.html
Sent from the Camel - Users mailing list archive at Nabble.com.