6. The method of claim 1 , wherein the document is an Extensible Markup Language (XML) document, and the mapping specification includes expressions suitable for locating the first parent node and the descendent nodes within the XML document.
1. A method of querying a document containing hierarchical information that includes parent nodes and descendent nodes, comprising: locating a first parent node in the document by using a mapping specification; determining if the first parent node satisfies a query; and fetching from the document nested descendent nodes relating to the first parent node in response to determining that the first parent node satisfies the query, wherein the locating the first parent node comprises parsing only parent nodes in the document.