You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/09/06 15:30:56 UTC

Is there a way to split the content of a XML file when we reach a size of 50 MB

Hi,

Is there a way to split the content of a XML file when we reach by example
the size of 50 MB ?

Regards,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel - Karaf - ServiceMix Committer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blog : http://cmoulliard.blogspot.com |  Twitter :
http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard

Re: Is there a way to split the content of a XML file when we reach a size of 50 MB

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Sep 6, 2010 at 3:30 PM, Charles Moulliard <cm...@gmail.com> wrote:
> Hi,
>
> Is there a way to split the content of a XML file when we reach by example
> the size of 50 MB ?
>

You can use XPath to split it if its possible to define an expression
which splits it nears the sizes you want.


> Regards,
>
> Charles Moulliard
>
> Senior Enterprise Architect (J2EE, .NET, SOA)
> Apache Camel - Karaf - ServiceMix Committer
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Blog : http://cmoulliard.blogspot.com |  Twitter :
> http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Is there a way to split the content of a XML file when we reach a size of 50 MB

Posted by Willem Jiang <wi...@gmail.com>.
Hi Charles,

How about using Stax API[1] XmlEventReader to pull the XML inputstream 
and Write the XML with XmlEventWirte in your customer bean?

[1]http://download.oracle.com/docs/cd/E17802_01/webservices/webservices/docs/2.0/tutorial/doc/StAX4.html

Willem

Charles Moulliard wrote:
> Hi,
> 
> Is there a way to split the content of a XML file when we reach by example
> the size of 50 MB ?
> 
> Regards,
> 
> Charles Moulliard
> 
> Senior Enterprise Architect (J2EE, .NET, SOA)
> Apache Camel - Karaf - ServiceMix Committer
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Blog : http://cmoulliard.blogspot.com |  Twitter :
> http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard
>