Trees Indices Help
Python Standard Library
Package xml :: Package sax :: Module saxutils
[]

Module saxutils

A library of useful helper classes to the SAX classes, for the convenience of application and driver writers.

Classes [hide private]
XMLGenerator XMLFilterBase
This class is designed to sit between an XMLReader and the client application's event handlers.
Functions [hide private]
__dict_replace(s, d)
Replace substrings of a string using a dictionary.
escape(data, entities={})
Escape &, <, and > in a string of data.
unescape(data, entities={})
Unescape &amp;, &lt;, and &gt; in a string of data.
quoteattr(data, entities={})
Escape and quote an attribute value.
prepare_input_source(source, base='')
This function takes an InputSource and an optional base URL and returns a fully resolved InputSource object ready for reading.
Variables [hide private]
_StringTypes = [<type 'str'>, <type 'unicode'>] _error_handling = 'xmlcharrefreplace'

Imports: os, urlparse, urllib, types, handler, xmlreader


Function Details [hide private]

escape(data, entities={})

Escape &, <, and > in a string of data.

You can escape 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.

unescape(data, entities={})

Unescape &amp;, &lt;, and &gt; 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.

quoteattr(data, entities={})

Escape and quote an attribute value.

Escape &, <, and > in a string of data, then quote it for use as an attribute value. The " character will be escaped as well, if necessary.

You can escape 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.


Trees Indices Help
Python Standard Library

AltStyle によって変換されたページ (->オリジナル) /