[XML-SIG] Ideas for web/ package
Fred L. Drake, Jr.
Sat, 16 Feb 2002 00:54:07 -0500
Thomas B. Passin writes:
> Another thing that comes up often enough to be handled is escaping markup
> delimiters (as opposed to escaping for url encoding), so markup that is
> intended for display (i.e., show the source xml) can be put into attributes
> and elements. Would it make sense to include this kind of escape/unescape?
I think you may be looking for the escape() and quoteattr() functions
defined in the xml.sax.saxutils module. These are documented in the
Python Library Reference. quoteattr() was introduced in Python 2.2
and PyXML 0.7.
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation