FileDocCategorySizeDatePackage
XMLPullParserConfiguration.javaAPI DocJava SE 6 API3383Tue Jun 10 00:22:54 BST 2008com.sun.org.apache.xerces.internal.xni.parser

XMLPullParserConfiguration

public interface XMLPullParserConfiguration implements XMLParserConfiguration
Represents a parser configuration that can be used as the configuration for a "pull" parser. A pull parser allows the application to drive the parser instead of having document information events "pushed" to the registered handlers.

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.

author
Andy Clark, IBM
version
$Id: XMLPullParserConfiguration.java,v 1.2.6.1 2005/09/06 08:32:41 neerajbj Exp $

Fields Summary
Constructors Summary
Methods Summary
public voidcleanup()
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.

public booleanparse(boolean complete)
Parses the document in a pull parsing fashion.

param
complete True if the pull parser should parse the remaining document completely.
return
True if there is more document to parse.
exception
XNIException Any XNI exception, possibly wrapping another exception.
exception
IOException An IO exception from the parser, possibly from a byte stream or character stream supplied by the parser.
see
#setInputSource

public voidsetInputSource(com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource inputSource)
Sets the input source for the document to parse.

param
inputSource The document's input source.
exception
XMLConfigurationException Thrown if there is a configuration error when initializing the parser.
exception
IOException Thrown on I/O error.
see
#parse(boolean)