Back to index

python3.2  3.2.2
Public Member Functions | Private Attributes
xml.sax.saxutils.XMLFilterBase Class Reference
Inheritance diagram for xml.sax.saxutils.XMLFilterBase:
Inheritance graph
[legend]
Collaboration diagram for xml.sax.saxutils.XMLFilterBase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def error
def fatalError
def warning
def setDocumentLocator
def startDocument
def endDocument
def startPrefixMapping
def endPrefixMapping
def startElement
def endElement
def startElementNS
def endElementNS
def characters
def ignorableWhitespace
def processingInstruction
def skippedEntity
def notationDecl
def unparsedEntityDecl
def resolveEntity
def parse
def setLocale
def getFeature
def setFeature
def getProperty
def setProperty
def getParent
def setParent
def getContentHandler
def setContentHandler
def getDTDHandler
def setDTDHandler
def getEntityResolver
def setEntityResolver
def getErrorHandler
def setErrorHandler

Private Attributes

 _parent

Detailed Description

This class is designed to sit between an XMLReader and the
client application's event handlers.  By default, it does nothing
but pass requests up to the reader and events on to the handlers
unmodified, but subclasses can override specific methods to modify
the event stream or the configuration requests as they pass
through.

Definition at line 194 of file saxutils.py.


Constructor & Destructor Documentation

def xml.sax.saxutils.XMLFilterBase.__init__ (   self,
  parent = None 
)

Definition at line 202 of file saxutils.py.

00202 
00203     def __init__(self, parent = None):
00204         xmlreader.XMLReader.__init__(self)
00205         self._parent = parent

Here is the caller graph for this function:


Member Function Documentation

def xml.sax.saxutils.XMLFilterBase.characters (   self,
  content 
)

Definition at line 246 of file saxutils.py.

00246 
00247     def characters(self, content):
00248         self._cont_handler.characters(content)

Definition at line 225 of file saxutils.py.

00225 
00226     def endDocument(self):
00227         self._cont_handler.endDocument()

def xml.sax.saxutils.XMLFilterBase.endElement (   self,
  name 
)

Definition at line 237 of file saxutils.py.

00237 
00238     def endElement(self, name):
00239         self._cont_handler.endElement(name)

def xml.sax.saxutils.XMLFilterBase.endElementNS (   self,
  name,
  qname 
)

Definition at line 243 of file saxutils.py.

00243 
00244     def endElementNS(self, name, qname):
00245         self._cont_handler.endElementNS(name, qname)

Definition at line 231 of file saxutils.py.

00231 
00232     def endPrefixMapping(self, prefix):
00233         self._cont_handler.endPrefixMapping(prefix)

def xml.sax.saxutils.XMLFilterBase.error (   self,
  exception 
)

Definition at line 208 of file saxutils.py.

00208 
00209     def error(self, exception):
00210         self._err_handler.error(exception)

Here is the caller graph for this function:

def xml.sax.saxutils.XMLFilterBase.fatalError (   self,
  exception 
)

Definition at line 211 of file saxutils.py.

00211 
00212     def fatalError(self, exception):
00213         self._err_handler.fatalError(exception)

Definition at line 34 of file xmlreader.py.

00034 
00035     def getContentHandler(self):
00036         "Returns the current ContentHandler."
00037         return self._cont_handler

def xml.sax.xmlreader.XMLReader.getDTDHandler (   self) [inherited]

Definition at line 42 of file xmlreader.py.

00042 
00043     def getDTDHandler(self):
00044         "Returns the current DTD handler."
00045         return self._dtd_handler

Definition at line 50 of file xmlreader.py.

00050 
00051     def getEntityResolver(self):
00052         "Returns the current EntityResolver."
00053         return self._ent_handler

def xml.sax.xmlreader.XMLReader.getErrorHandler (   self) [inherited]

Definition at line 58 of file xmlreader.py.

00058 
00059     def getErrorHandler(self):
00060         "Returns the current ErrorHandler."
00061         return self._err_handler

def xml.sax.saxutils.XMLFilterBase.getFeature (   self,
  name 
)

Reimplemented from xml.sax.xmlreader.XMLReader.

Definition at line 283 of file saxutils.py.

00283 
00284     def getFeature(self, name):
00285         return self._parent.getFeature(name)

Definition at line 297 of file saxutils.py.

00297 
00298     def getParent(self):
00299         return self._parent

def xml.sax.saxutils.XMLFilterBase.getProperty (   self,
  name 
)

Reimplemented from xml.sax.xmlreader.XMLReader.

Definition at line 289 of file saxutils.py.

00289 
00290     def getProperty(self, name):
00291         return self._parent.getProperty(name)

Definition at line 249 of file saxutils.py.

00249 
00250     def ignorableWhitespace(self, chars):
00251         self._cont_handler.ignorableWhitespace(chars)

def xml.sax.saxutils.XMLFilterBase.notationDecl (   self,
  name,
  publicId,
  systemId 
)

Definition at line 260 of file saxutils.py.

00260 
00261     def notationDecl(self, name, publicId, systemId):
00262         self._dtd_handler.notationDecl(name, publicId, systemId)

def xml.sax.saxutils.XMLFilterBase.parse (   self,
  source 
)

Reimplemented from xml.sax.xmlreader.XMLReader.

Definition at line 273 of file saxutils.py.

00273 
00274     def parse(self, source):
00275         self._parent.setContentHandler(self)
00276         self._parent.setErrorHandler(self)
00277         self._parent.setEntityResolver(self)
00278         self._parent.setDTDHandler(self)
00279         self._parent.parse(source)

Here is the caller graph for this function:

def xml.sax.saxutils.XMLFilterBase.processingInstruction (   self,
  target,
  data 
)

Definition at line 252 of file saxutils.py.

00252 
00253     def processingInstruction(self, target, data):
00254         self._cont_handler.processingInstruction(target, data)

def xml.sax.saxutils.XMLFilterBase.resolveEntity (   self,
  publicId,
  systemId 
)

Definition at line 268 of file saxutils.py.

00268 
00269     def resolveEntity(self, publicId, systemId):
00270         return self._ent_handler.resolveEntity(publicId, systemId)

def xml.sax.xmlreader.XMLReader.setContentHandler (   self,
  handler 
) [inherited]

Reimplemented in xml.sax.expatreader.ExpatParser.

Definition at line 38 of file xmlreader.py.

00038 
00039     def setContentHandler(self, handler):
00040         "Registers a new object to receive document content events."
00041         self._cont_handler = handler

Definition at line 219 of file saxutils.py.

00219 
00220     def setDocumentLocator(self, locator):
00221         self._cont_handler.setDocumentLocator(locator)

def xml.sax.xmlreader.XMLReader.setDTDHandler (   self,
  handler 
) [inherited]

Definition at line 46 of file xmlreader.py.

00046 
00047     def setDTDHandler(self, handler):
00048         "Register an object to receive basic DTD-related events."
00049         self._dtd_handler = handler

def xml.sax.xmlreader.XMLReader.setEntityResolver (   self,
  resolver 
) [inherited]

Definition at line 54 of file xmlreader.py.

00054 
00055     def setEntityResolver(self, resolver):
00056         "Register an object to resolve external entities."
00057         self._ent_handler = resolver

def xml.sax.xmlreader.XMLReader.setErrorHandler (   self,
  handler 
) [inherited]

Definition at line 62 of file xmlreader.py.

00062 
00063     def setErrorHandler(self, handler):
00064         "Register an object to receive error-message events."
00065         self._err_handler = handler

def xml.sax.saxutils.XMLFilterBase.setFeature (   self,
  name,
  state 
)

Reimplemented from xml.sax.xmlreader.XMLReader.

Definition at line 286 of file saxutils.py.

00286 
00287     def setFeature(self, name, state):
00288         self._parent.setFeature(name, state)

def xml.sax.saxutils.XMLFilterBase.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.

Reimplemented from xml.sax.xmlreader.XMLReader.

Definition at line 280 of file saxutils.py.

00280 
00281     def setLocale(self, locale):
00282         self._parent.setLocale(locale)

def xml.sax.saxutils.XMLFilterBase.setParent (   self,
  parent 
)

Definition at line 300 of file saxutils.py.

00300 
00301     def setParent(self, parent):
00302         self._parent = parent
00303 
00304 # --- Utility functions

def xml.sax.saxutils.XMLFilterBase.setProperty (   self,
  name,
  value 
)

Reimplemented from xml.sax.xmlreader.XMLReader.

Definition at line 292 of file saxutils.py.

00292 
00293     def setProperty(self, name, value):
00294         self._parent.setProperty(name, value)

Definition at line 255 of file saxutils.py.

00255 
00256     def skippedEntity(self, name):
00257         self._cont_handler.skippedEntity(name)

Definition at line 222 of file saxutils.py.

00222 
00223     def startDocument(self):
00224         self._cont_handler.startDocument()

def xml.sax.saxutils.XMLFilterBase.startElement (   self,
  name,
  attrs 
)

Definition at line 234 of file saxutils.py.

00234 
00235     def startElement(self, name, attrs):
00236         self._cont_handler.startElement(name, attrs)

def xml.sax.saxutils.XMLFilterBase.startElementNS (   self,
  name,
  qname,
  attrs 
)

Definition at line 240 of file saxutils.py.

00240 
00241     def startElementNS(self, name, qname, attrs):
00242         self._cont_handler.startElementNS(name, qname, attrs)

def xml.sax.saxutils.XMLFilterBase.startPrefixMapping (   self,
  prefix,
  uri 
)

Definition at line 228 of file saxutils.py.

00228 
00229     def startPrefixMapping(self, prefix, uri):
00230         self._cont_handler.startPrefixMapping(prefix, uri)

def xml.sax.saxutils.XMLFilterBase.unparsedEntityDecl (   self,
  name,
  publicId,
  systemId,
  ndata 
)

Definition at line 263 of file saxutils.py.

00263 
00264     def unparsedEntityDecl(self, name, publicId, systemId, ndata):
00265         self._dtd_handler.unparsedEntityDecl(name, publicId, systemId, ndata)

def xml.sax.saxutils.XMLFilterBase.warning (   self,
  exception 
)

Definition at line 214 of file saxutils.py.

00214 
00215     def warning(self, exception):
00216         self._err_handler.warning(exception)


Member Data Documentation

Definition at line 204 of file saxutils.py.


The documentation for this class was generated from the following file: