| | |
- xml.sax.handler.ContentHandler
-
- XMLGenerator
- xml.sax.xmlreader.XMLReader
-
- XMLFilterBase
class XMLFilterBase(xml.sax.xmlreader.XMLReader) |
| |
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. |
| |
Methods defined here:
- __init__(self, parent=None)
- characters(self, content)
- endDocument(self)
- endElement(self, name)
- endElementNS(self, name, qname)
- endPrefixMapping(self, prefix)
- error(self, exception)
- fatalError(self, exception)
- getFeature(self, name)
- getParent(self)
- getProperty(self, name)
- ignorableWhitespace(self, chars)
- notationDecl(self, name, publicId, systemId)
- parse(self, source)
- processingInstruction(self, target, data)
- resolveEntity(self, publicId, systemId)
- setDocumentLocator(self, locator)
- setFeature(self, name, state)
- setLocale(self, locale)
- setParent(self, parent)
- setProperty(self, name, value)
- skippedEntity(self, name)
- startDocument(self)
- startElement(self, name, attrs)
- startElementNS(self, name, qname, attrs)
- startPrefixMapping(self, prefix, uri)
- unparsedEntityDecl(self, name, publicId, systemId, ndata)
- warning(self, exception)
Data and non-method functions defined here:
- __doc__ = 'This class is designed to sit between an XMLRea...onfiguration requests as they pass\n through.'
- __module__ = 'xml.sax.saxutils'
Methods inherited from xml.sax.xmlreader.XMLReader:
- 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.
- 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.
|
class XMLGenerator(xml.sax.handler.ContentHandler) |
| |
|
| |
Methods defined here:
- __init__(self, out=None, encoding='iso-8859-1')
- characters(self, content)
- endElement(self, name)
- endElementNS(self, name, qname)
- endPrefixMapping(self, prefix)
- ignorableWhitespace(self, content)
- processingInstruction(self, target, data)
- startDocument(self)
- startElement(self, name, attrs)
- startElementNS(self, name, qname, attrs)
- startPrefixMapping(self, prefix, uri)
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'xml.sax.saxutils'
Methods inherited from xml.sax.handler.ContentHandler:
- endDocument(self)
- Receive notification of the end of a document.
The SAX parser will invoke this method only once, and it will
be the last method invoked during the parse. The parser shall
not invoke this method until it has either abandoned parsing
(because of an unrecoverable error) or reached the end of
input.
- setDocumentLocator(self, locator)
- Called by the parser to give the application a locator for
locating the origin of document events.
SAX parsers are strongly encouraged (though not absolutely
required) to supply a locator: if it does so, it must supply
the locator to the application by invoking this method before
invoking any of the other methods in the DocumentHandler
interface.
The locator allows the application to determine the end
position of any document-related event, even if the parser is
not reporting an error. Typically, the application will use
this information for reporting its own errors (such as
character content that does not match an application's
business rules). The information returned by the locator is
probably not sufficient for use with a search engine.
Note that the locator will return correct information only
during the invocation of the events in this interface. The
application should not attempt to use it at any other time.
- skippedEntity(self, name)
- Receive notification of a skipped entity.
The Parser will invoke this method once for each entity
skipped. Non-validating processors may skip entities if they
have not seen the declarations (because, for example, the
entity was declared in an external DTD subset). All processors
may skip external entities, depending on the values of the
http://xml.org/sax/features/external-general-entities and the
http://xml.org/sax/features/external-parameter-entities
properties.
| |