Originally posted by Anthony Castillon:
Hi. Why don't you try using XPath to traverse your XML? JDK 1.5 already has an XPath interface which will allow you to use an XPath expression to jump to a node and work with it. I used it to parse XML files and it was pretty fast (well, until the XML file got really big and I had to switch to StAX).
Hope this helps.
Anthony
For large document processing I've recently been introduced to DataDirect XQuery, which offers an XQJ implementation based on the JSR-255 proposed final draft. It offers stream-based processing of large XML documents using StAX (Woodstox I believe). Coupled with document projection techniques it does a pretty good job of keeping the memory footprint as small as possible. I've really taken a liking to the XQuery approach of processing XML. Unfortunately the DataDirect implementation is fully commercial, so I'm still on the look-out for a solid freeware (preferably open-source) alternative, for use in my private little developement projects
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.