13. A computer program product comprising a computer recordable medium having a computer readable program recorded thereon, wherein the computer readable program, when executed on a computing device, causes the computing device to: receive a hierarchical query; separate the hierarchical query into a plurality of query legs; perform an index scan for evaluating the hierarchical query against at least one index of at least one hierarchically structured electronic document by processing a query leg on the at least one index of the at least one hierarchically structured electronic document to determine if a condition of the query leg is met by at least one node in the at least one index of the at least one hierarchically structured electronic document, wherein if at least one node in the at least one index of the at least one hierarchically structured electronic document satisfies the condition of the query leg, an entry in at least one hash table is populated with information regarding the at least one node; generate results of the hierarchical query based on content of the at least one hash table; and return the results of the hierarchical query to an originator of the hierarchical query, wherein the at least one hash table comprises a BUILD hash table and a PROBE hash table, wherein the BUILD hash table is used to store document nodes matching a predicate of the query leg and to buffer document nodes satisfying extraction nodes of the query leg, and wherein the PROBE hash table stores document nodes satisfying predicates from query legs evaluated prior to a current query leg being evaluated.
13. A computer program product comprising a computer recordable medium having a computer readable program recorded thereon, wherein the computer readable program, when executed on a computing device, causes the computing device to: receive a hierarchical query; separate the hierarchical query into a plurality of query legs; perform an index scan for evaluating the hierarchical query against at least one index of at least one hierarchically structured electronic document by processing a query leg on the at least one index of the at least one hierarchically structured electronic document to determine if a condition of the query leg is met by at least one node in the at least one index of the at least one hierarchically structured electronic document, wherein if at least one node in the at least one index of the at least one hierarchically structured electronic document satisfies the condition of the query leg, an entry in at least one hash table is populated with information regarding the at least one node; generate results of the hierarchical query based on content of the at least one hash table; and return the results of the hierarchical query to an originator of the hierarchical query, wherein the at least one hash table comprises a BUILD hash table and a PROBE hash table, wherein the BUILD hash table is used to store document nodes matching a predicate of the query leg and to buffer document nodes satisfying extraction nodes of the query leg, and wherein the PROBE hash table stores document nodes satisfying predicates from query legs evaluated prior to a current query leg being evaluated. 17. The computer program product of claim 13 , wherein the computer readable program causes the computing device to perform the index scan for each query leg of the plurality of query legs sequentially, and wherein the PROBE hash table and the BUILD hash table are switched with each subsequent index scan for each subsequent query leg.