"Bob La Quey" <[EMAIL PROTECTED]> writes: > Just walk the XML file once with SAX and load up your data structures.
There is also the stream- or pull-style interface¹, preferred these days over SAX. Two big advantages come to mind: No need to maintain the element stack, and, related, the ability to write recursive-descent consumers. That is, with recursive-descent style code, one uses the function call stack to maintain state. The trade-off: the event-to-function mapping in SAX must be replaced by switch/case dispatching in consumer code. Footnotes: ¹ http://java.sun.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html -- Steven E. Harris -- KPLUG-List@kernel-panic.org http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list