xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] Parsing large element content in streaming mode
- From: Arshad Noor <arshad.noor AT strongauth.com>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] Parsing large element content in streaming mode
- Date: Sun, 21 Nov 2010 22:50:29 -0800
Hi,
I'm new to XOM and am experimenting using it to generate and parse
XMLEncryption (XENC) documents (http://www.w3.org/TR/xmlenc-core/).
While the XENC tree is fairly shallow, one particular element - the
CipherValue element - presents some challenges:
1) The first 12 or 24 bytes (depending on the encryption algorithm)
of CipherValue content is only Base64-encoded);
2) The remainder of the CipherValue content, concatenated to the first
12 or 24 bytes from step #1, is encrypted *and* Base64-encoded;
3) 99.99% of the document's content is *inside* this single CipherValue
element.
While DOM/XOM/Stax work fine for reading and writing documents of a
reasonable size (100MB), some documents are expected to be multiple
gigabytes in size. Trying to create a document tree in memory with
such a large file, predictably, crashes the JVM.
Based on sample XOM code, I have extended the NodeFactory and am
trying to process the CipherValue content using startMakingElement()
method. However, not having the position of the underlying stream
in this method (or the Builder/NodeFactory) makes it difficult to
process the CipherValue element's content.
Given my inexperience with XOM, I may be missing a solution obvious
to the experts; are there any suggestions on how I can solve this
problem? Thanks.
Arshad Noor
StrongAuth, Inc.
-
[XOM-interest] Parsing large element content in streaming mode,
Arshad Noor, 11/22/2010
-
Re: [XOM-interest] Parsing large element content in streaming mode,
Elliotte Rusty Harold, 11/22/2010
- Re: [XOM-interest] Parsing large element content in streaming mode, Arshad Noor, 11/22/2010
-
Re: [XOM-interest] Parsing large element content in streaming mode,
Elliotte Rusty Harold, 11/22/2010
Archive powered by MHonArc 2.6.24.