6. A computer program product for processing a query with reference to a hierarchical document that includes recursive nodes comprising a non-transitory computer-readable medium including a computer readable program, wherein the computer readable program when executed on a computer causes the computer to: receive 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; receive the hierarchical document including one or more document nodes; identify one or more query nodes flagged with the FOR binding in the query structure; determine one or more query node combinations that may be in valid step instance ancestor paths for the identified one or more query nodes; and identify one or more extraction entries containing the determined query node combinations.
6. A computer program product for processing a query with reference to a hierarchical document that includes recursive nodes comprising a non-transitory computer-readable medium including a computer readable program, wherein the computer readable program when executed on a computer causes the computer to: receive 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; receive the hierarchical document including one or more document nodes; identify one or more query nodes flagged with the FOR binding in the query structure; determine one or more query node combinations that may be in valid step instance ancestor paths for the identified one or more query nodes; and identify one or more extraction entries containing the determined query node combinations. 8. The computer program product of claim 6 , wherein the computer readable program when executed on the computer causes the computer to: generate results using step instance match candidates for each of the identified one or more extraction entries.