public interface XMLEventParser
Modifier and Type | Method and Description |
---|---|
void |
freeResources()
Release large resources used by the parser, but does not dispose of the parser itself.
|
XMLEventParser |
getParent()
Returns this parser's parent parser.
|
XMLEventParser |
newInstance()
Creates a new empty parser instance of the same type.
|
java.lang.Object |
parse(XMLEventParserContext context,
javax.xml.stream.events.XMLEvent event,
java.lang.Object... args)
Parse the event and initialize the parser's values to those found in the event.
|
void |
setParent(XMLEventParser parent)
Specifies the parent parser of this parser.
|
void freeResources()
XMLEventParser getParent()
XMLEventParser newInstance() throws java.lang.Exception
XMLEventParserContext
when creating parsers associated with specific event types.
The returned parser has the same namespace as the instance creating it, but has empty fields for all other
values.java.lang.Exception
- if an error or exception occurs while attempting to create the parser.java.lang.Object parse(XMLEventParserContext context, javax.xml.stream.events.XMLEvent event, java.lang.Object... args) throws javax.xml.stream.XMLStreamException
context
- a current parser context.event
- the event to parse.args
- an optional list of arguments that may by used by subclasses.this
, otherwise returns null.javax.xml.stream.XMLStreamException
- if an exception occurs during event-stream reading.void setParent(XMLEventParser parent)
parent
- this parser's parent parser.