|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.cyberneko.pull.parsers.Xerces2
An implementation of a pull parser that can use any standard XNI parser configuration as a driver.
Note: This class is provided for convenience. However, for the best performance, a parser should be implemented directly to the NekoPull interfaces to provide pull parsing functionality.
| Field Summary | |
protected org.apache.xerces.xni.parser.XMLPullParserConfiguration |
fConfiguration
XNI pull parser configuration. |
protected boolean |
fDone
Finished parsing. |
protected EventCollector |
fEventCollector
Event collector. |
protected static java.lang.String |
REUSE_BUFFERS
Feature identifer: reuse buffers. |
| Constructor Summary | |
Xerces2()
Constructs a pull parser with the standard configuration. |
|
Xerces2(org.apache.xerces.xni.parser.XMLPullParserConfiguration config)
Constructs a pull parser with the specified configuration. |
|
| 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 resource 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.lang.String REUSE_BUFFERS
protected boolean fDone
protected org.apache.xerces.xni.parser.XMLPullParserConfiguration fConfiguration
protected EventCollector fEventCollector
| Constructor Detail |
public Xerces2()
public Xerces2(org.apache.xerces.xni.parser.XMLPullParserConfiguration config)
| Method Detail |
public void setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource)
throws org.apache.xerces.xni.parser.XMLConfigurationException,
java.io.IOException
setInputSource in interface XMLPullParserinputSource - 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()public void cleanup()
cleanup in interface XMLPullParser
public void setFeature(java.lang.String featureId,
boolean state)
throws org.apache.xerces.xni.parser.XMLConfigurationException
setFeature in interface XMLPullParserfeatureId - 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
setProperty in interface XMLPullParserpropertyId - 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
next field).
nextEvent in interface XMLPullParserorg.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 XMLPullParserfeatureId - 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 XMLPullParserpropertyId - The property identifier.
org.apache.xerces.xni.parser.XMLConfigurationException - Thrown if there is a configuration
error.public void setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler errorHandler)
setErrorHandler in interface XMLPullParsererrorHandler - The error resolver.public org.apache.xerces.xni.parser.XMLErrorHandler getErrorHandler()
getErrorHandler in interface XMLPullParserpublic void setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
setEntityResolver in interface XMLPullParserentityResolver - The new entity resolver.public org.apache.xerces.xni.parser.XMLEntityResolver getEntityResolver()
getEntityResolver in interface XMLPullParser
public void setLocale(java.util.Locale locale)
throws org.apache.xerces.xni.XNIException
setLocale in interface XMLPullParserlocale - 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()
getLocale in interface XMLPullParser
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||