Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Large xml file

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Kevin S. Clarke" <ksclarke AT gmail.com>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Large xml file
  • Date: Wed, 23 Sep 2009 09:46:38 -0400

Actually, XOM has a nice streaming mode too. You can use it this way
by extending NodeFactory.

http://www.xom.nu/apidocs/nu/xom/NodeFactory.html

There is a very brief example at:

https://xom.dev.java.net/source/browse/xom/src/nu/xom/samples/DTDGenerator.java?rev=HEAD&only_with_tag=MAIN

shortened - http://bit.ly/2Z4zI

I've used it to take a very large XML file and create individual
documents on the file system from child elements of the root.

Kevin



On Wed, Sep 23, 2009 at 9:30 AM, Peter Taylor <peter.taylor AT greenhat.com>
wrote:
> Advice on this really does depend on why you are splitting the xml.
> However potentially you should be using:
>
> http://stax.codehaus.org/Home
>
> That is, streaming the xml file rather than using XOM, as it is an
> in-memory implementation which is not going to scale to 'large' xml
> files.
>
> Regards,
> Peter T
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>




Archive powered by MHonArc 2.6.24.

Top of Page