Patent ID: 7523119

Claim:
An extensible-markup-language Path Language (XPath) evaluating method comprising evaluating the XPath relevant to an extensible-markup-language (XML) document by use of a computer, said step of evaluating being carried out individually concerning inputted XML events, while subjecting the XML document to streaming processing, the step of evaluating XPath comprising: a first step of serially inputting XML event strings constituting an XML document to be processed; a second step of serially evaluating the XPath respectively relevant to the inputted XML events while subjecting the XML document to streaming processing and retaining information concerning a result of partial evaluation of the XPath in given storing means when the XPath is partially established with respect to a given XML event; a third step of repeating the partial evaluation of the XPath along with the input of the XML event strings while considering the result of the partial evaluation retained in the storing means and evaluating that the XPath is established with respect to the XML document when the last part of the XPath is established; and judging establishment of the entire XPath while accumulating results of said partial evaluation enabling evaluation of the XPath by use of said streaming processing wherein the second step includes the steps of: generating an automaton for expressing the XPath to be evaluated; and evaluating the XPath partially by allowing transition of a state of the automaton based on inputted respective XML events and retaining a result of the partial evaluation as the state of the automaton; wherein the second step includes the steps of: generating a first stack which expresses the XPath to be evaluated with a string of stack elements; and generating a second stack for analyzing a nested structure of the XML document to be processed based on respective inputted XML events and then evaluating the XPath partially by comparing the first stack with the second stack; and wherein the second step includes the steps of: serially constructing a document tree indicating a document structure of the XML document to be processed based on input of respective XML events; and evaluating the XPath along with construction of the document tree by use of the document tree including a part which has been constructed.