Interface XMLPullParserConfiguration
-
- All Superinterfaces:
XMLComponentManager
,XMLParserConfiguration
- All Known Implementing Classes:
DTDConfiguration
,IntegratedParserConfiguration
,NonValidatingConfiguration
,SchemaParsingConfig
,SecureProcessingConfiguration
,SecurityConfiguration
,SoftReferenceSymbolTableConfiguration
,StandardParserConfiguration
,XIncludeAwareParserConfiguration
,XIncludeParserConfiguration
,XML11Configuration
,XML11DTDConfiguration
,XML11NonValidatingConfiguration
,XMLGrammarCachingConfiguration
,XPointerParserConfiguration
public interface XMLPullParserConfiguration extends 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 theparse(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 theparse(boolean):boolean
method with a "complete" value oftrue
.- Version:
- $Id$
- Author:
- Andy Clark, IBM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.boolean
parse(boolean complete)
Parses the document in a pull parsing fashion.void
setInputSource(XMLInputSource inputSource)
Sets the input source for the document to parse.-
Methods inherited from interface org.smooks.engine.delivery.sax.ng.org.apache.xerces.xni.parser.XMLParserConfiguration
addRecognizedFeatures, addRecognizedProperties, getDocumentHandler, getDTDContentModelHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getLocale, getProperty, parse, setDocumentHandler, setDTDContentModelHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setLocale, setProperty
-
-
-
-
Method Detail
-
setInputSource
void setInputSource(XMLInputSource inputSource) throws XMLConfigurationException, IOException
Sets the input source for the document to parse.- Parameters:
inputSource
- The document's input source.- Throws:
XMLConfigurationException
- Thrown if there is a configuration error when initializing the parser.IOException
- Thrown on I/O error.- See Also:
parse(boolean)
-
parse
boolean parse(boolean complete) throws XNIException, IOException
Parses the document in a pull parsing fashion.- Parameters:
complete
- True if the pull parser should parse the remaining document completely.- Returns:
- True if there is more document to parse.
- Throws:
XNIException
- Any XNI exception, possibly wrapping another exception.IOException
- An IO exception from the parser, possibly from a byte stream or character stream supplied by the parser.- See Also:
setInputSource(org.smooks.engine.delivery.sax.ng.org.apache.xerces.xni.parser.XMLInputSource)
-
cleanup
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.
-
-