Package reflectometry :: Package model1d :: Package profileview :: Module xmlescape

Module xmlescape

source code

History:

Author xmlescape: Gabriel Genellina Author xmlunescape: Leif K-Brooks, based on work by Aaron Swartz Source http://www.thescripts.com/forum/thread594350.html

Modified by Paul Kienzle

Functions
 
xmlescape(text, d={u'"': u'&quot;', u'<': u'&lt;', u'>': u'&gt;', u' ': u'&nbsp;...)
xmlstr = xmlescape(str) Convert text into a form suitable for inclusion in an XML file, with characters such as '&' replaced by &amp;
source code
 
xmlunescape(s)
str = xmlunescape(xmlstr) Replace XML entities with original ISO characters.
source code
Variables
  unichr2entity = {u'"': u'&quot;', u'<': u'&lt;', u'>': u'&gt;'...
Variables Details

unichr2entity

Value:
{u'"': u'&quot;',
 u'<': u'&lt;',
 u'>': u'&gt;',
 u' ': u'&nbsp;',
 u'¡': u'&iexcl;',
 u'¢': u'&cent;',
 u'£': u'&pound;',
 u'¤': u'&curren;',
...