1. A computer implemented method for reading, into a memory, a compact tree node representation of an XML document having a tree index data structure and separate node data, the method comprising: allocating a first portion of the memory to store an entire XML tree index data structure; allocating a second portion of the memory, the second portion of the memory separate from the first portion of the memory; reading the entire XML tree index data structure into the first portion of the memory, wherein the XML tree index data structure comprises the structure of the XML tree and does not comprise the separate node data; and processing an XML tree index entry, the processing comprising: accessing the XML tree index entry to retrieve a reference to at least one node from the separate node data; and loading into the second portion of the memory, the at least one node from the separate node data.