1) Use XML entity references in a top-level XML document to "include" other XML documents. This approach splits the file, but the DOM parser will still read it as one big XML document.
2) Split the XML document and write Java code to merge the documents together after parsing each.
Could you explain a bit more about why you need to split the big file?
I think the important question is - what kind of processing do you have to do with the big XML file? For a simple pass through the entire document, extracting specific information, SAX processing will use very little memory. If you have to modify the document structure extensively and rewrite it you may be buying more memory... How big are we talking about anyway? Bill
Can you really tell me that we aren't dealing with suspicious baked goods? And then there is this tiny ad: