class documentation

class XMLEntityEscaper(object):

View In Hierarchy

Undocumented

Method __escape Undocumented
Method __init__ Undocumented
Method __unescape Undocumented
Method escape Replace characters with their character references.
Method escape​_entities Replace characters with their character entity references.
Method unescape Unescape character references.
Class Variable __characterrefs Undocumented
Class Variable __escapable Undocumented
Instance Variable codepoint2entity Undocumented
Instance Variable name2codepoint Undocumented
def __escape(self, m):

Undocumented

def __init__(self, codepoint2name, name2codepoint):

Undocumented

def __unescape(self, m):

Undocumented

def escape(self, text):

Replace characters with their character references.

Replace characters by their named entity references. Non-ASCII characters, if they do not have a named entity reference, are replaced by numerical character references.

The return value is guaranteed to be ASCII.

def escape_entities(self, text):

Replace characters with their character entity references.

Only characters corresponding to a named entity are replaced.

def unescape(self, text):

Unescape character references.

All character references (both entity references and numerical character references) are unescaped.

__characterrefs =

Undocumented

__escapable =

Undocumented

codepoint2entity =

Undocumented

name2codepoint =

Undocumented