Interface for reading an XML document using callbacks.
XMLReader is the interface that an XML parser's SAX2 driver must
implement. This interface allows an application to set and query features
and properties in the parser, to register event handlers for document
processing, and to initiate a document parse.
All SAX interfaces are assumed to be synchronous: the parse methods
must not return until parsing is complete, and readers must wait for an
event-handler callback to return before reporting the next event.
|
|
|
parse(self,
source)
Parse an XML document from a system identifier or an InputSource. |
|
|
|
getContentHandler(self)
Returns the current ContentHandler. |
|
|
|
setContentHandler(self,
handler)
Registers a new object to receive document content events. |
|
|
|
getDTDHandler(self)
Returns the current DTD handler. |
|
|
|
setDTDHandler(self,
handler)
Register an object to receive basic DTD-related events. |
|
|
|
getEntityResolver(self)
Returns the current EntityResolver. |
|
|
|
setEntityResolver(self,
resolver)
Register an object to resolve external entities. |
|
|
|
getErrorHandler(self)
Returns the current ErrorHandler. |
|
|
|
setErrorHandler(self,
handler)
Register an object to receive error-message events. |
|
|
|
setLocale(self,
locale)
Allow an application to set the locale for errors and warnings. |
|
|
|
getFeature(self,
name)
Looks up and returns the state of a SAX2 feature. |
|
|
|
setFeature(self,
name,
state)
Sets the state of a SAX2 feature. |
|
|
|
getProperty(self,
name)
Looks up and returns the value of a SAX2 property. |
|
|
|
setProperty(self,
name,
value)
Sets the value of a SAX2 property. |
|
|