If performance/memory usage is important, you might want to look at the latest XML open source
parsing lib called vtd-xml

http://vtd-xml.sf.net