Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Procesing very large text node

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT ibiblio.org>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Procesing very large text node
  • Date: Sun, 7 Feb 2010 16:43:07 -0500

On Sun, Feb 7, 2010 at 6:20 AM, Marcin Waldowski
<marcin.waldowski1 AT gmail.com> wrote:
> Hello.
>
> I need to process XML which contains the following tag
>
> <Object Encoding="http://www.w3.org/2000/09/xmldsig#base64"; Id="1"
> MimeType="text/plain">
> U29tZSBmaWxlIGNvbnRlbnQ=
> </Object>
>
> The text node of this tag contains base64 representation of some file. It
> can be very big file (2GB is a good example). I need to calculate SHA1 of
> that file.
>
> Is it possible to process that tag with XOM in some clever way without using
> lots of memory and without issuing OutOfMemoryError?
>

This really sounds like a job for SAX, I'm afraid, unless you can
allot a really large mount of memory to the JVM.

--
Elliotte Rusty Harold
elharo AT ibiblio.org




Archive powered by MHonArc 2.6.24.

Top of Page