[jdom-interest] How JDOM handle large files?
ssmith at summitlogic.com
Mon May 7 10:43:34 PDT 2001
Adam Simantel (mailto:Adam.Simantel at merant.com) has code that would solve
your problem. He sent me the code, and I'm sure he would do the same for
you, if you ask. He plans on submitting the code to jdom-contrib
eventually. You might also want to look at the XMLDocumentSplitter class
implementation in the book "Building Oracle XML Applications"
(http://www.oreilly.com/catalog/orxmlapp/). All the source code of the book
is available on-line. XMLDocumentSplitter is in the Chapter 6 examples.
The example is SAX based and does not use JDOM.
> -----Original Message-----
> From: Risheng Lin [mailto:rlin at eng.utoledo.edu]
> Sent: Monday, May 07, 2001 12:46 PM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] How JDOM handle large files?
> Hi all,
> I sent out this message last week and here I send it again,
> hoping that I
> can get some feedbacks from some of you.
> I have 2 questions regarding JDOM:
> 1. I have a XML document of size above 50MB, and I want a
> full document
> view with random access to get,set or modify the data inside
> it. It seems
> not possible to handle it with DOM because of the
> java.lang.outOfMemoryError when using the parser to read the file .
> Both JavaWorld article "Easy Java/XML integration with JDOM,
> Part 1" and
> "Java and XML" book state that:
> "JDOM attempts to incorporate the best of DOM and SAX. It's a
> API designed to perform quickly in a small-memory footprint.
> JDOM also
> provides a full document view with random access but,
> surprisingly, it does
> not require the entire document to be in memory. "
> So could you tell me whether it is possible to handle such a
> large XML file
> by JDOM? Or any one has written a deferred builder?
> 2. Since the xml file is so large in size, I want to split it
> into several
> pieces if possible. I think XLink or XInclude might be
> helpful. ( BTW, XML
> Schema has xsd:include or xsd:import to bring together
> several schema,
> there is no such rules in xml specification. Do you know any
> other ways to
> do it? )
> So if I use xlink, does JDOM currently supports xlink for the
> full document
> view with random access as well?
> Many thanks,
> To control your jdom-interest membership:
uraddr at yourhost.com
More information about the jdom-interest