|
GXPARSE hosted by |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Parser<T extends Global>
XML stream parser that invokes Listener methods to drive
an XML processing application.
| Method Summary | |
|---|---|
Element |
getCurrentElement()
Get the element that is on top of the element stack. |
Element[] |
getElementStack()
Get the element stack as an array. |
T |
getGlobal()
Get the instance of Global, if one was provided to the
Parser. |
Listener<Parser<T>> |
getListener()
Get Listener. |
Location |
getLocation()
Get information about the current location of the Parser
in the input stream. |
boolean |
isParsing(QName qName)
Indicate whether a particular element is currently being parsed. |
void |
parse(Input input)
Parse a document, without making an instance of Global
accessible to all Listener methods. |
void |
parse(Input input,
T global)
Parse a document, making an instance of Global accessible
to all Listener methods. |
void |
setListener(Listener<Parser<T>> listener)
Set Listener. |
| Method Detail |
|---|
Listener<Parser<T>> getListener()
Get Listener.
void setListener(Listener<Parser<T>> listener)
Set Listener.
listener - that will receive information from the parser.
NullPointerException - if listener is null
void parse(Input input)
throws ListenerException,
ParseException,
IOException
Parse a document, without making an instance of Global
accessible to all Listener methods.
input - an Input that has been initialized to
identify a source for an XML document
NullPointerException - if input is null
IllegalArgumentException - if input does not contain
enough information to identify a source that the parser can
read
ParseException - if any component of the Parser
throws an exception
ListenerException - if the Listener throws
ListenerException
IOException - if the Parser throws
IOException while reading input or the
Listener throws IOException while
writing output.
void parse(Input input,
T global)
throws ListenerException,
ParseException,
IOException
Parse a document, making an instance of Global accessible
to all Listener methods.
input - an Input that has been initialized to
identify a source for an XML documentglobal - an instance Global, or null.
NullPointerException - if input is null
IllegalArgumentException - if input does not contain
enough information to identify a source that the parser can
read
ParseException - if any component of the Parser
throws an exception
ListenerException - if the Listener throws
ListenerException
IOException - if the Parser throws
IOException while reading input or the
Listener throws IOException while
writing output.T getGlobal()
Get the instance of Global, if one was provided to the
Parser.
Global, or null.Element getCurrentElement()
Get the element that is on top of the element stack.
Element[] getElementStack()
Get the element stack as an array.
boolean isParsing(QName qName)
Indicate whether a particular element is currently being parsed.
true if the named element is currently being
parsed, false otherwiseLocation getLocation()
Get information about the current location of the Parser
in the input stream. The information is valid only during the
invocation of a Listener method.
Location when the parser is active, null when
the parser is not active
|
GXPARSE download | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||