buildTree

This method takes a XMLStreamReader and builds up
a JDOM tree. Recursion has been eliminated by using nodes'
parent/child relationship; this improves performance somewhat
(classic recursion-by-iteration-and-explicit stack transformation)