Avoid usage of DOM or big object trees. With all XML-Java binding marshallers 
it's gonna be more or less same. If you want do this fast, try to limit number 
of conversions. The best you can do is to use stream from beginning. Consider 
splitting file as described on Claus blog [1]. Also you may use partial 
unmarshall with JAXB (smaller documents), description is in JAXB dataformat 
docs [2].

[1] http://www.davsclaus.com/2011/11/splitting-big-xml-files-with-apache.html
[2] http://camel.apache.org/jaxb#JAXB-Partialmarshalling%2Funmarshalling

Best regards,
Łukasz Dywicki
--
[email protected]
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org

Wiadomość napisana przez BobbySixKiller <[email protected]> w dniu 20 lut 
2013, o godz. 14:52:

> Hi, 
> 
> I have a simple question about parsing xml and performance. Actually my
> route is like this : 
> 
> from("endpointIn") 
> .convertBodyTo(String.class)// 
> .unmarshal().jaxb("com.groupemb.entite.search.compario.in")// 
> .process(...) 
> 
> where com.groupemb.entite.search.compario.in refers to a jaxb.index file
> which refers to a java class named ResponseCompario.java 
> 
> It works fine but i was wondering, is this route more performant ?: 
> from("endpointIn") 
> .convertBodyTo(ResponseCompario.class)// 
> .process(...) 
> 
> NB: The xml files are pretty big. 
> 
> Best regards, 
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Parsing-XML-Performance-tp5727867.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to