I love XML, but 60GB is well beyond what I feel is its limit when reasonable
performance is important. I think you should consider not using XML for
data of this size.
> -----Original Message-----
> From: Marc Dumontier [mailto:dumontier_at_mshri.on.ca]
> Sent: Friday, October 31, 2003 10:49 PM
> To: 'users_at_jaxb.dev.java.net'
> Subject: Processing Large XML Files
>
>
> Hi,
>
> I'm trying to find the best solution to progressing a very
> large XML file.
> This XML file is filled with independent elements which i
> want to unmarshall
> one at a time because of memory constraints (the file is about 60GB).
>
> <BIND-Interaction-Set>
> <BIND-Interaction>
> ...
> </BIND-Interaction>
> ....
> ....
> </BIND-Interaction-Set>
>
>
> I've tried to build individual DOM documents from a SAX
> stream...and that
> works ok (using transformations), but then JAXB won't
> unmarshall it. It
> seems that it gets a nullpointerexception in the unmarshaller
> because the
> localName in startElement() is null.
>
> here's some sample code
> any better approaches would be appreciated
>
> from my content handler's endElement()
>
> if(localName.equals("BIND-Interaction")) {
> System.out.println("end of interaction");
> consumer.endDocument();
> Document doc = getDocument();
> JAXBContext jc =
> JAXBContextManager.getContext();
> Unmarshaller u =
> jc.createUnmarshaller();
> u.setValidating( false );
> BINDInteraction o =
> (BINDInteraction)u.unmarshal( doc );
>
> }
>
>
>
> from the contentHandler's startElement
>
> try{
>
> TransformerHandler handler =
> factory.newTransformerHandler();
> setConsumer(handler);
> result = new DOMResult();
> handler.setResult(result);
> consumer.startDocument();
>
>
> thanks,
> Marc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
------------------------------------------------------------------------------------------
A.G. Edwards & Sons' outgoing and incoming e-mails are electronically
archived and subject to review and/or disclosure to someone other
than the recipient.
------------------------------------------------------------------------------------------