Streaming parser API
AssigneeBEA Systems, Inc.
InventorsChris Fry, Sam Pullara
Life of this patent
Estimating the term…
Abstract
A streaming parser API expands a base parser by building an iterative method on top of the base parser. The iterative method allows a user to pass a selected element type to the base parser, which can step through the XML document until it locates a matching element. The base parser can then extract the element, process the element as an event, and place the event on an event stream for use by an application.
Claims21
A method for parsing an XML document, comprising:
- allowing a user to request specific XML events by calling a parsing routine, the parsing routine placing events selected by the user onto the event stream;
- reading the XML document with a base parser and generating a plurality of XML events, each of said XML events being associated with an element in the XML document;and
- constructing an event stream from the plurality of XML events.
A method for extracting a portion of an XML document, comprising:
- passing the name of a selected element to be extracted from the XML document to an iterative method;
- reading an element tag of the XML document using a base parser;
- stepping through the element tags of the XML document using the iterative method and the base parser until the element tag corresponding to the selected element is located by the base parser;
- and
- extracting the selected element and placing the selected element on an event stream.
A method for extracting a selected element from an XML document, comprising:
- passing the name of the selected element to a parse routine;
- stepping through the elements of the XML document using a base parser, the parse routine directing the base parser to continue stepping through the XML document until the selected element is located;
- and
- extracting the selected element from the XML document using the base parser and placing the selected element on an event stream.
A streaming parser for use in parsing an XML document, comprising:
- a base parser programmed to read the XML document and to generate a plurality of XML events, each XML event associated with an element in the XML document;
- and
- a parsing method on top of the base parser, the parsing method stepping the base parser through the elements of the XML document until a selected element is detected, the base parser generating an event associated with the selected element and placing the event on an event stream.
A computer-readable medium, comprising:
- means for reading the XML document using a base parser and generating a series of XML events, each XML event associated with an element in the XML document;
- means for constructing an event stream from the series of XML event;
- and
- means for allowing a user to request specific XML events by calling a parsing method, the parsing method placing events selected by the user onto the event stream.
A computer program product for execution by a computer for parsing an XML document, comprising:
- computer code for reading the XML document using a base parser and generating a series of XML events, each XML event associated with an element in the XML document;
- computer code for constructing an event stream from the series of XML event;
- and
- computer code for allowing a user to request specific XML events by calling a parsing method, the parsing method placing events selected by the user onto the event stream.
A system for updating a data item on a network, comprising:
- means for reading the XML document using a base parser and generating a series of XML events, each XML event associated with an element in the XML document;
- means for constructing an event stream from the series of XML event;
- and
- means for allowing a user to request specific XML events by calling a parsing method, the parsing method placing events selected by the user onto the event stream.
A computer system comprising:
- a processor;
- object code executed by said processor, said object code configured to:
- read the XML document using a base parser and generate a series of XML events, each XML event being associated with an element in the XML document;
- construct an event stream from the series of XML events;
- and
- allow a user to request specific XML events by calling a parsing method, the parsing method placing events selected by the user onto the event stream.
Dependencies are inferred from the claim text.