Described herein are approaches that allow an XML entity to be accessed in
a way that requires less memory. These approaches involve dynamically
generating and maintaining an in-memory representation of only a portion
of an XML tree. The in-memory representation of an XML tree is herein
referred to as a node tree. The node tree contains data from the XML
tree, and is generated by extracting data from a compressed form of an
XML entity. In addition, the node tree contains information about the
location of specific elements within the compressed XML entity. The
approaches described herein allow an XML tree to be accessed without
having to generate an in-memory representation of the whole XML tree,
thus reducing the amount of memory needed to access the data in the XML
tree.