A pull parser using this type of configuration first calls
the setInputSource method. After the input
source is set, the pull parser repeatedly calls the
parse(boolean):boolean method. This method
returns a value of true if there is more to parse in the
document.
Calling the parse(XMLInputSource) is equivalent
to setting the input source and calling the
parse(boolean):boolean method with a "complete"
value of true.
| Modifier and Type | Method and Description |
|---|---|
| public void | cleanup()
If the application decides to terminate parsing before the xml document is fully parsed, the application should call this method to free any resource allocated during parsing. |
| public boolean | Returns: True if there is more document to parse.True if the pull parser should parse the
remaining document completely. complete)Parses the document in a pull parsing fashion. |
| public void | setInputSource(XMLInputSource
The document's input source. inputSource)Sets the input source for the document to parse. |
| cleanup | back to summary |
|---|---|
| public void cleanup() If the application decides to terminate parsing before the xml document is fully parsed, the application should call this method to free any resource allocated during parsing. For example, close all opened streams. | |
| parse | back to summary |
|---|---|
| public boolean parse(boolean complete) throws XNIException, IOException Parses the document in a pull parsing fashion.
| |
| setInputSource | back to summary |
|---|---|
| public void setInputSource(XMLInputSource inputSource) throws XMLConfigurationException, IOException Sets the input source for the document to parse.
| |