By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,649 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,649 IT Pros & Developers. It's quick & easy.

JAXB: Marshaling and unmarshaling very large documents

P: n/a
I have some legacy data that I want to convert to XML. I've designed
a schema to represent the data in XML form, and I'm trying to figure
out how best to perform the raw->XML conversion. The Java web
services tutorial shows how to use Transformers and SAXSource objects
to perform the conversion in a memory-efficient way, but it requires
that I take responsibility for adherence to the schema myself in how I
generate the XML output. So I thought I'd see what I can do with
JAXB. Marshaling (i.e., converting Java classes based on the schema
to XML) works great for small amounts of data, but I don't think it
will scale well to raw input files that are hundreds of MB in size.
So I'm wondering if there's some way to combine the two approaches:
SAX-oriented event-based generation of output files together with
JAXB-contolled streaming of the output file. Is such a thing
possible?

On the other side of it, once I have the data in XML form, is there a
way to combine event-based parsing with unmarshaling so that I can
read a subset of the XML data into the JAXB-based Java classes?

Thanks,

Sandeep
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.