camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralf Petersilka <ralf.petersi...@its-telco.de>
Subject Re: Transforming large XML files
Date Tue, 04 May 2010 19:54:08 GMT

Hi, 

I tried the output option with Camel 2.3. I still get the OutOfMemoryError.

The route now looks like:

from(file:/c:/in/largefiles?filename=large.xml").
setHeader(Exchange.XSLT_FILE_NAME,constant(File.createTempFile("temp_","xml").getAbsolutePath())).
to("xslt:my_large_converter.xslt?output=file").bean(MyBusinessService.class)

Ralf


willem.jiang wrote:
> 
> Hi,
> 
> Can you try out the latest Camel 2.3-SNAPSHOT?
> There is output option which can specify the output type that xslt 
> component endpoint.
> You can find more information here[1]
> 
> [1] http://camel.apache.org/xslt.html
> 
> Willem
> 
> Ralf Petersilka wrote:
>> Hi, 
>> 
>> we receive large XML messages (several tens of MB. Sometimes up to
>> 500MB). I
>> would like to convert these messages using the xslt transformer.
>> Unfortunately it seems that the result will always be a string which
>> results
>> in a OutOfMemory error.
>> 
>> My route looks something like this
>> 
>> from(file:/c:/in/largefiles?filename=large.xml").to("xslt:my_large_converter.xslt").bean(MyBusinessService.class)
>> 
>> Within the MyBusinessService the XML file is deserialised and the content
>> is
>> processed.
>> 
>> Is there a workaround for this? I thought about providing a file option.
>> But
>> this would require to create a temporary file whenever the route is
>> executed. 
>> 
>> 
>> Thanks Ralf
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Transforming-large-XML-files-tp28446731p28452321.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message