Patent ID: 8862611

Claim:
A computer-implemented method for processing queries for XML twigs using bottom-up processing, the method comprising: receiving, by a computing device, a plurality of query XML twigs, each query XML twig including at least one sub-twig, each sub-twig including at least one element; evaluating at least one time an arbitrary Boolean operation in the at least one sub-twig, evaluating at least one other time a different arbitrary Boolean operation in the at least one sub-twig, the arbitrary Boolean operation including at least once a primary Boolean predicate and at least one other time a derived Boolean predicate; determining that at least one element in an XML tree is a root element of at least one sub-twig of the plurality of query XML twigs; in response to determining that at least one element in the XML tree is a root element, populating a logic block, the logic block comprising one or more stack trees including at least one Boolean element, the Boolean element being a data structure configured for evaluating the predicate logic of the arbitrary Boolean operator, the logic block being configured to maintain existing structural relationships between different XML tree elements of various queries while the arbitrary Boolean operation is satisfied; inserting the element into an appropriate stack of a hierarchical stack; evaluating that at least one element contributes to finding results of the query; discarding at least one element that does not contribute to finding results of the query; determining that at least one element is the root of the query XML twig; and in response to determining that at least one element is the root of the query XML twig, dissociating the logic block for evaluating the predicate logic of the arbitrary Boolean operator from a stack used to store the elements and return twig results.