| org.cyberneko.pull.XMLPullParser
All known Subclasses: org.cyberneko.pull.parsers.Xerces2,
XMLPullParser | public interface XMLPullParser extends XMLEventIterator,XMLComponentManager(Code) | | This interface defines an XML pull parser built on top of the Xerces
Native Interface (XNI). Using a pull parser, an application controls
the parsing of an XML stream by requesting event objects returned by
the nextEvent method of the XMLEventIterator
interface. This is different than the traditional SAX paradigm in
which the application registers handlers and document information is
pushed by the parser to the handlers. For specific details,
refer to the documentation.
author: Andy Clark version: $Id$ |
Method 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
resources allocated during parsing. | public XMLEntityResolver | getEntityResolver() Returns the registered entity resolver. | public XMLErrorHandler | getErrorHandler() Returns the registered error handler. | public boolean | getFeature(String featureId) Returns the state of a feature. | public Locale | getLocale() Returns the locale. | public Object | getProperty(String propertyId) Returns the value of a property. | public XMLEvent | nextEvent() Returns the next event in the document or null if there are
no more events. | public void | setEntityResolver(XMLEntityResolver entityResolver) Sets the entity resolver. | public void | setErrorHandler(XMLErrorHandler errorHandler) Sets the error handler. | public void | setFeature(String featureId, boolean state) Sets the state of a feature. | public void | setInputSource(XMLInputSource inputSource) Sets the input source for the document to parse. | public void | setLocale(Locale locale) Set the locale to use for messages. | public void | setProperty(String propertyId, Object value) Sets the value of a property. |
cleanup | public void cleanup()(Code) | | If the application decides to terminate parsing before the xml document
is fully parsed, the application should call this method to free any
resources allocated during parsing. For example, close all opened streams.
|
getEntityResolver | public XMLEntityResolver getEntityResolver()(Code) | | Returns the registered entity resolver.
|
getErrorHandler | public XMLErrorHandler getErrorHandler()(Code) | | Returns the registered error handler.
|
getFeature | public boolean getFeature(String featureId) throws XMLConfigurationException(Code) | | Returns the state of a feature.
Parameters: featureId - The feature identifier. throws: XMLConfigurationException - Thrown if there is a configurationerror. |
getLocale | public Locale getLocale()(Code) | | Returns the locale.
|
getProperty | public Object getProperty(String propertyId) throws XMLConfigurationException(Code) | | Returns the value of a property.
Parameters: propertyId - The property identifier. throws: XMLConfigurationException - Thrown if there is a configurationerror. |
nextEvent | public XMLEvent nextEvent() throws XNIException, IOException(Code) | | Returns the next event in the document or null if there are
no more events.
exception: XNIException - Any XNI exception, possibly wrapping another exception. exception: IOException - An IO exception from the parser, possiblyfrom a byte stream or character streamsupplied by the parser. See Also: XMLPullParser.setInputSource |
setEntityResolver | public void setEntityResolver(XMLEntityResolver entityResolver)(Code) | | Sets the entity resolver.
Parameters: entityResolver - The new entity resolver. |
setErrorHandler | public void setErrorHandler(XMLErrorHandler errorHandler)(Code) | | Sets the error handler.
Parameters: errorHandler - The error resolver. |
setFeature | public void setFeature(String featureId, boolean state) throws XMLConfigurationException(Code) | | Sets the state of a feature. This method is called by the parser
and gets propagated to components in this parser configuration.
Parameters: featureId - The feature identifier. Parameters: state - The state of the feature. throws: XMLConfigurationException - Thrown if there is a configurationerror. |
setInputSource | public void setInputSource(XMLInputSource inputSource) throws XMLConfigurationException, IOException(Code) | | Sets the input source for the document to parse.
Parameters: inputSource - The document's input source. exception: XMLConfigurationException - Thrown if there is a configuration error when initializing theparser. exception: IOException - Thrown on I/O error. See Also: XMLPullParser.nextEvent See Also: XMLPullParser.cleanup |
setLocale | public void setLocale(Locale locale) throws XNIException(Code) | | Set the locale to use for messages.
Parameters: locale - The locale object to use for localization of messages. exception: XNIException - Thrown if the parser does not support thespecified locale. |
setProperty | public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code) | | Sets the value of a property. This method is called by the parser
and gets propagated to components in this parser configuration.
Parameters: propertyId - The property identifier. Parameters: value - The value of the property. throws: XMLConfigurationException - Thrown if there is a configurationerror. |
|
|