Patent ID: 8099438

Claim:
A system to process an XML document associated with a schema, comprising: a streaming parser capable of generating a stream of discrete pieces of the XML document; and a matching component, running on one or more processors, capable of receiving the stream of discrete pieces of the XML document, wherein the stream of discrete pieces of the XML document contains one or more upstream discrete pieces of the XML document and a downstream discrete piece of the XML document; analyzing the schema associated with the XML document and using the schema to determine that the one or more upstream discrete pieces of the XML document are related to the downstream discrete piece of the XML document in the stream of discrete pieces of the XML document; keeping in memory said one or more upstream discrete pieces of the XML document before receiving the downstream discrete piece of the XML document from the stream; performing a match based on evaluating both the one or more upstream discrete pieces and the downstream discrete piece of the XML document after receiving the downstream discrete piece of the XML document; and passing the downstream discrete piece and the one or more upstream discrete pieces of the XML document to a user object for handling when the match is reached in the performing step.