xml.sax.xmlreader.AttributesNS.getNameByQName()

AttributesNS.getNameByQName(name) Return the (namespace, localname) pair for a qualified name.

xml.sax.xmlreader.AttributesImpl

class xml.sax.xmlreader.AttributesImpl(attrs) This is an implementation of the Attributes interface (see section The Attributes Interface). This is a dictionary-like object which represents the element attributes in a startElement() call. In addition to the most useful dictionary operations, it supports a number of other methods as described by the interface. Objects of this class should be instantiated by readers; attrs must be a dictionary-like object containing a mapping from attribute na

xml.sax.xmlreader.Attributes.getValue()

Attributes.getValue(name) Return the value of attribute name.

xml.sax.xmlreader.Attributes.getType()

Attributes.getType(name) Returns the type of the attribute name, which is normally 'CDATA'.

xml.sax.xmlreader.Attributes.getNames()

Attributes.getNames() Return the names of the attributes.

xml.sax.xmlreader.Attributes.getLength()

Attributes.getLength() Return the number of attributes.

xml.sax.saxutils.XMLGenerator

class xml.sax.saxutils.XMLGenerator(out=None, encoding='iso-8859-1', short_empty_elements=False) This class implements the ContentHandler interface by writing SAX events back into an XML document. In other words, using an XMLGenerator as the content handler will reproduce the original document being parsed. out should be a file-like object which will default to sys.stdout. encoding is the encoding of the output stream which defaults to 'iso-8859-1'. short_empty_elements controls the formatti

xml.sax.saxutils.XMLFilterBase

class xml.sax.saxutils.XMLFilterBase(base) 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.

xml.sax.saxutils.unescape()

xml.sax.saxutils.unescape(data, entities={}) Unescape '&', '<', and '>' in a string of data. You can unescape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. '&amp', '<', and '>' are always unescaped, even if entities is provided.

xml.sax.saxutils.quoteattr()

xml.sax.saxutils.quoteattr(data, entities={}) Similar to escape(), but also prepares data to be used as an attribute value. The return value is a quoted version of data with any additional required replacements. quoteattr() will select a quote character based on the content of data, attempting to avoid encoding any quote characters in the string. If both single- and double-quote characters are already in data, the double-quote characters will be encoded and data will be wrapped in double-quo