2. A method for processing a query with reference to a hierarchical document that includes recursive nodes, comprising: receiving, with a computer including a processor, the query, wherein the query is formed by one or more paths, and wherein each path includes one or more steps, wherein a query structure represents the query, wherein the query structure includes query nodes, and wherein each of the query nodes includes a next step in a path of the query, a level for a next step instance, a parent step instance identifier of a next step instance, a matched step instance identifier when a match is found, and is flagged with a FOR binding or a LET binding; receiving the hierarchical document including one or more document nodes; identifying one or more query nodes flagged with the FOR binding in the query structure; determining one or more query node combinations that may be in valid step instance ancestor paths for the identified one or more query nodes; and identifying one or more extraction entries containing the determined query node combinations.
2. A method for processing a query with reference to a hierarchical document that includes recursive nodes, comprising: receiving, with a computer including a processor, the query, wherein the query is formed by one or more paths, and wherein each path includes one or more steps, wherein a query structure represents the query, wherein the query structure includes query nodes, and wherein each of the query nodes includes a next step in a path of the query, a level for a next step instance, a parent step instance identifier of a next step instance, a matched step instance identifier when a match is found, and is flagged with a FOR binding or a LET binding; receiving the hierarchical document including one or more document nodes; identifying one or more query nodes flagged with the FOR binding in the query structure; determining one or more query node combinations that may be in valid step instance ancestor paths for the identified one or more query nodes; and identifying one or more extraction entries containing the determined query node combinations. 3. The method of claim 2 , further comprising: examining step instance ancestor paths to identify step instance identifiers for the one or more query nodes; and sorting the identified step instance identifiers.