Package xml :: Package sax :: Module xmlreader :: Class XMLReader
[show private | hide private]
[frames | no frames]

Class XMLReader

Known Subclasses:
HeaderFooterParser, Parser, RecordParser

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.
Method Summary
  __init__(self)
  getContentHandler(self)
Returns the current ContentHandler.
  getDTDHandler(self)
Returns the current DTD handler.
  getEntityResolver(self)
Returns the current EntityResolver.
  getErrorHandler(self)
Returns the current ErrorHandler.
  getFeature(self, name)
Looks up and returns the state of a SAX2 feature.
  getProperty(self, name)
Looks up and returns the value of a SAX2 property.
  parse(self, source)
Parse an XML document from a system identifier or an InputSource.
  setContentHandler(self, handler)
Registers a new object to receive document content events.
  setDTDHandler(self, handler)
Register an object to receive basic DTD-related events.
  setEntityResolver(self, resolver)
Register an object to resolve external entities.
  setErrorHandler(self, handler)
Register an object to receive error-message events.
  setFeature(self, name, state)
Sets the state of a SAX2 feature.
  setLocale(self, locale)
Allow an application to set the locale for errors and warnings.
  setProperty(self, name, value)
Sets the value of a SAX2 property.

Method Details

getContentHandler(self)

Returns the current ContentHandler.

getDTDHandler(self)

Returns the current DTD handler.

getEntityResolver(self)

Returns the current EntityResolver.

getErrorHandler(self)

Returns the current ErrorHandler.

getFeature(self, name)

Looks up and returns the state of a SAX2 feature.

getProperty(self, name)

Looks up and returns the value of a SAX2 property.

parse(self, source)

Parse an XML document from a system identifier or an InputSource.

setContentHandler(self, handler)

Registers a new object to receive document content events.

setDTDHandler(self, handler)

Register an object to receive basic DTD-related events.

setEntityResolver(self, resolver)

Register an object to resolve external entities.

setErrorHandler(self, handler)

Register an object to receive error-message events.

setFeature(self, name, state)

Sets the state of a SAX2 feature.

setLocale(self, locale)

Allow an application to set the locale for errors and warnings.

SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, however, they must throw a SAX exception. Applications may request a locale change in the middle of a parse.

setProperty(self, name, value)

Sets the value of a SAX2 property.

Generated by Epydoc 2.1 on Mon Aug 27 16:12:11 2007 http://epydoc.sf.net