10. A method comprising: accepting an XML document stream; applying a query twig to the XML document stream; extracting tuples from the XML document stream based on the query twig and, during streaming of the XML document stream, proactively limiting a quantity of extracted tuples via foregoing: extraction of duplicate tuples; and extraction of tuples that do not satisfy query twig criteria; storing, at a non-leaf node in the query twig, information about a child node, and employing the information in the limiting a quantity of extracted tuples, wherein the information includes state information about the child node, the state information conveying information that relates at least one node in the XML document stream; and pre-computing partial results during streaming of an XML document, wherein the XML document stream used to pre-compute partial results is not buffered towards computing a final result; wherein said accepting comprises accepting the XML document stream of a size that exceeds available memory.
10. A method comprising: accepting an XML document stream; applying a query twig to the XML document stream; extracting tuples from the XML document stream based on the query twig and, during streaming of the XML document stream, proactively limiting a quantity of extracted tuples via foregoing: extraction of duplicate tuples; and extraction of tuples that do not satisfy query twig criteria; storing, at a non-leaf node in the query twig, information about a child node, and employing the information in the limiting a quantity of extracted tuples, wherein the information includes state information about the child node, the state information conveying information that relates at least one node in the XML document stream; and pre-computing partial results during streaming of an XML document, wherein the XML document stream used to pre-compute partial results is not buffered towards computing a final result; wherein said accepting comprises accepting the XML document stream of a size that exceeds available memory. 17. The method according to claim 10 , wherein said extracting comprises: accommodating a nesting node from an XML document stream; and applying a reverse stream to a descendant of a nesting node.