For serializing, looks like you could use a SAX approach with the
XmlBean's save(ContentHandler,LexicalHandler) method:
OutputStream out = ...
SAXDocumentSerializer saxOut = new SAXDocumentSerializer();
saxOut.setOutputStream(out);
myXmlBeanDocument.save(saxOut,
That works great. Thanks.
I am getting about 30% reduction in size. I can get another 30% (total
~60%) if I compress the byte[] afterwards.
I know this is highly object dependent, but does these 2 steps sound like
the smallest I can make an object?
Thanks.
Tim Watts-3 wrote:
For
You'll probably get a better size reduction by just compressing the text
XML. Binary XML representations can be faster to process and smaller
than text XML, but they don't compress nearly as well.
- Dennis
Dennis M. Sosnoski
XML and Web Services in Java
Training and Consulting
3 matches
Mail list logo