XML parser

Diez B. Roggisch deets at nospam.web.de
Mon Oct 20 09:53:44 EDT 2008


RC wrote:

> By default the
> 
> document = xml.dom.minidom.parse(inputFileName.xml)
> 
> This will convert all the & to &
> But I want to convert the & back to &
> 
> Is there a module or method in Python?
> I know there is such method in PHP, but I am
> new in Python.

>>> from xml.sax import saxutils
>>> saxutils.escape("&")
'&'
>>>

Diez



More information about the Python-list mailing list