This may be beyond the capabilities of the Java VM due to the size of the files being dealt with (50-100MB xml files)
Right now I have a set of xml files sent as zips, which are in turn all decompressed and then all XML in the directory are processed one at a time using SAX.
To save time and space (since the compression is about 1:10) I was wondering if there is a way to pass a ZipFileEntry that is an xml file to a SAX handler.
I've seen it done using DocumentBuilder and other xml parsing methods, but for peformance (and especially memory) I'm sticking with SAX.
Currently I am using SAX in the following way
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
MyHandler handler = new MyHandler();
for( String curFile : xmlFiles )
{
System.out.println( "\n\n\t>>>>> open " + curFile + " <<<<<\n");
saxParser.parse( "file://" + new File( dirToProcess + curFile ).getAbsolutePath(), handler );
}