Systems and methods for streaming XPath query
AssigneeBEA Systems, Inc.
InventorPatrick Calahan
Life of this patent
Estimating the term…
Abstract
An improved XML query system represents an XML document as a stream of discrete ‘events,’ with each event representing a portion of the document as the document is being parsed. Expression-based event matching such as XPath can be performed against the event stream using a stack to keep only the relevant contexts in memory. Observers can be used to listen for matching events. Matching events can then be routed for processing by appropriate objects or components and returned to the event stream if necessary. This description is not intended to be a complete description of, or limit the scope of, the invention. Other features, aspects, and objects of the invention can be obtained from a review of the specification, the figures, and the claims.
Claims34
A system to process an XML document, comprising:
- a streaming parser capable of parsing an XML document and generating a stream of at least one event, wherein each event can represent a portion of the document;
- a matching component capable of performing matching on an event in the stream and notifying an observer if the event is a match;
- said observer capable of listening for a matching event and passing it to a user object;
- and
- said user object capable of handling the matching event.
A method for processing an XML document, comprising:
- parsing an XML document and generating a stream of at least one event, wherein each event can represent a portion of the document;
- performing matching on an event in the stream and notifying an observer if the event is a match;
- listening for a matching event and passing it to a user object;
- and
- handling the matching event.
A machine readable medium having instructions stored thereon that when executed by a processor cause a system to:
- parse an XML document and generate a stream of at least one event, wherein each event can represent a portion of the document;
- perform matching on an event in the stream and notify an observer if the event is a match;
- listen for a matching event and pass it to a user object;
- and
- handle the matching event.
A system for processing an XML document, comprising:
- means for parsing an XML document and generating a stream of at least one event, wherein each event can represent a portion of the document;
- means for performing matching on an event in the stream and notifying an observer if the event is a match;
- means for listening for a matching event and passing it to a user object;
- and
- means for handling the matching event.
A computer data signal embodied in a transmission medium, comprising:
- a code segment including instructions to parse an XML document and generate a stream of at least one event, wherein each event can represent a portion of the document;
- a code segment including instructions to perform matching on an event in the stream and notify an observer if the event is a match;
- a code segment including instructions to listen for a matching event and pass it to a user object;
- and
- a code segment including instructions to handle the matching event.
Dependencies are inferred from the claim text.