decoding XML-ified special chars such as "

Christopher chris_mk at hotmail.com
Tue Jul 30 17:28:51 EDT 2002


Hey Gabe,

Well, I'll assume that you have PyXML (really a must if you are going
to do anything with XML in Python).  If that is right, here you are...

from xml.sax.saxutils import escape

data = escape(orig_data)

and there you are.  Otherwise, you might get by using
urllib.unquote(data).  Hope that help.

Chris



"Gabe Newcomb" <Gabe.Newcomb at noetix.com> wrote in message news:<mailman.1027968580.20805.python-list at python.org>...
> Is there a module to take strings such as ", & and turn them
> into the characters they normally represent (', &)?
> 
> Gabe Newcomb
> Software Test Automation Engineer
> 425.372.2732
> Noetix Corporation
> www.noetix.com
> 
> after years of waiting, nothing came



More information about the Python-list mailing list