Can I assume the elements are in parallel so I can match them as they were written in the XML file like so:
nodeListA.item(7)
nodeListB.item(7)

Also, one last question. As I'm currently using the sax parser on a set of test data, the xml file I will be using with this program is over 70MB. Last time I tried to load the file with this program, Java runs out of memory and throws me an error: java.lang.OutOfMemoryError: Java heap space

Returns a NodeList of all descendant Elements with a given tag name, in document order.

So yes, you should be able to pair them directly.

On the second question, you say the sax parser is dying on an out of memory or the dom parser? I wouldn't think the sax parser would have any trouble with that since it's more like a firehose of data and doesn't need to retain the entire model in memory.