|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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.
| Method Summary | |
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. |
org.apache.xerces.xni.parser.XMLEntityResolver |
getEntityResolver()
Returns the registered entity resolver. |
org.apache.xerces.xni.parser.XMLErrorHandler |
getErrorHandler()
Returns the registered error handler. |
boolean |
getFeature(java.lang.String featureId)
Returns the state of a feature. |
java.util.Locale |
getLocale()
Returns the locale. |
java.lang.Object |
getProperty(java.lang.String propertyId)
Returns the value of a property. |
XMLEvent |
nextEvent()
Returns the next event in the document or null if there are no more events. |
void |
setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
Sets the entity resolver. |
void |
setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler errorHandler)
Sets the error handler. |
void |
setFeature(java.lang.String featureId,
boolean state)
Sets the state of a feature. |
void |
setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource)
Sets the input source for the document to parse. |
void |
setLocale(java.util.Locale locale)
Set the locale to use for messages. |
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
Sets the value of a property. |
| Method Detail |
public void setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource)
throws org.apache.xerces.xni.parser.XMLConfigurationException,
java.io.IOException
inputSource - The document's input source.
org.apache.xerces.xni.parser.XMLConfigurationException - Thrown if there is a
configuration error when initializing the
parser.
java.io.IOException - Thrown on I/O error.nextEvent(),
cleanup()public void cleanup()
public void setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler errorHandler)
errorHandler - The error resolver.public org.apache.xerces.xni.parser.XMLErrorHandler getErrorHandler()
public void setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
entityResolver - The new entity resolver.public org.apache.xerces.xni.parser.XMLEntityResolver getEntityResolver()
public void setLocale(java.util.Locale locale)
throws org.apache.xerces.xni.XNIException
locale - The locale object to use for localization of messages.
org.apache.xerces.xni.XNIException - Thrown if the parser does not support the
specified locale.public java.util.Locale getLocale()
public void setFeature(java.lang.String featureId,
boolean state)
throws org.apache.xerces.xni.parser.XMLConfigurationException
featureId - The feature identifier.state - The state of the feature.
org.apache.xerces.xni.parser.XMLConfigurationException - Thrown if there is a configuration
error.
public void setProperty(java.lang.String propertyId,
java.lang.Object value)
throws org.apache.xerces.xni.parser.XMLConfigurationException
propertyId - The property identifier.value - The value of the property.
org.apache.xerces.xni.parser.XMLConfigurationException - Thrown if there is a configuration
error.
public XMLEvent nextEvent()
throws org.apache.xerces.xni.XNIException,
java.io.IOException
nextEvent in interface XMLEventIteratororg.apache.xerces.xni.XNIException - Any XNI exception, possibly wrapping
another exception.
java.io.IOException - An IO exception from the parser, possibly
from a byte stream or character stream
supplied by the parser.setInputSource(org.apache.xerces.xni.parser.XMLInputSource)
public boolean getFeature(java.lang.String featureId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
getFeature in interface org.apache.xerces.xni.parser.XMLComponentManagerfeatureId - The feature identifier.
org.apache.xerces.xni.parser.XMLConfigurationException - Thrown if there is a configuration
error.
public java.lang.Object getProperty(java.lang.String propertyId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
getProperty in interface org.apache.xerces.xni.parser.XMLComponentManagerpropertyId - The property identifier.
org.apache.xerces.xni.parser.XMLConfigurationException - Thrown if there is a configuration
error.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||