7. A method of projecting a representation of an Extensible Markup Language (XML) document, the method comprising steps of: A) receiving the XML document as input; B) receiving at least one XPath query to be evaluated against the XML document; C) deriving a set of XPath expressions from the XML document, wherein the XPath expressions are represented as a rooted XPath expression tree with labeled vertices and edges, and wherein the XPath expression tree comprises at least one axis selected from a group consisting of: backward, ancestor, parent, following, preceding, following-sibling, and preceding-sibling axes; and D) constructing a projection of the XML document for evaluation of the XPath query, the projection based on the XPath expression tree, wherein the constructing step comprises: 1) normalizing the XPath expression tree into a canonical form, wherein the normalizing step comprises: a) rewriting instances of following, preceding, following-sibling and preceding-sibling axes in the XPath expression tree into order-blind axes, such as parent and ancestor, by introducing new vertices such that there are no more instances of following and preceding in the rewritten XPath expression tree; and b) merging vertices of the rewritten XPath expression tree to remove redundancies; 2) traversing the XML document in a depth-first manner to build a tree representation of the XML document, the traversing step comprising: a) generating start events when the traversal first visits an element; b) generating end events once the traversal of a subtree rooted at that element is finished; c) concurrently with generating the events, constructing nodes for all elements that may participate in an embedding; and d) adding all ancestor nodes of the elements that may participate in an embedding; E) evaluating the at least one XPath query against the tree representation in a bottom-up manner to produce a result such that the result of the evaluation of the XPath query on the projection of the XML document is the same as a result of evaluation of the XPath query on the XML document and comprises all nodes that are solutions of the XPath query, and their backward axes; and F) serializing the result.
7. A method of projecting a representation of an Extensible Markup Language (XML) document, the method comprising steps of: A) receiving the XML document as input; B) receiving at least one XPath query to be evaluated against the XML document; C) deriving a set of XPath expressions from the XML document, wherein the XPath expressions are represented as a rooted XPath expression tree with labeled vertices and edges, and wherein the XPath expression tree comprises at least one axis selected from a group consisting of: backward, ancestor, parent, following, preceding, following-sibling, and preceding-sibling axes; and D) constructing a projection of the XML document for evaluation of the XPath query, the projection based on the XPath expression tree, wherein the constructing step comprises: 1) normalizing the XPath expression tree into a canonical form, wherein the normalizing step comprises: a) rewriting instances of following, preceding, following-sibling and preceding-sibling axes in the XPath expression tree into order-blind axes, such as parent and ancestor, by introducing new vertices such that there are no more instances of following and preceding in the rewritten XPath expression tree; and b) merging vertices of the rewritten XPath expression tree to remove redundancies; 2) traversing the XML document in a depth-first manner to build a tree representation of the XML document, the traversing step comprising: a) generating start events when the traversal first visits an element; b) generating end events once the traversal of a subtree rooted at that element is finished; c) concurrently with generating the events, constructing nodes for all elements that may participate in an embedding; and d) adding all ancestor nodes of the elements that may participate in an embedding; E) evaluating the at least one XPath query against the tree representation in a bottom-up manner to produce a result such that the result of the evaluation of the XPath query on the projection of the XML document is the same as a result of evaluation of the XPath query on the XML document and comprises all nodes that are solutions of the XPath query, and their backward axes; and F) serializing the result. 10. The method of claim 7 wherein multiple XPath expressions are evaluated in parallel.