pyxmpp2.xmppserializer

Package pyxmpp2 :: Module xmppserializer |
[hide private]

# Module xmppserializer

XMPP serializer for ElementTree data.

XMPP has specific requirements for XML serialization. Predefined namespace prefixes must be used, including no prefix for the stanza namespace (which may be one of, at least, two different namespaces: 'jabber:client' and 'jabber:server')

Classes | [hide private]
| XMPPSerializer Implementation of the XMPP serializer.

Functions | [hide private]
remove_evil_characters(data) Remove control characters (not allowed in XML) from a string. |
`unicode` |
serialize(element) Serialize an XMPP element. |

Variables | [hide private]
| STANDARD_PREFIXES = ``{``'``http://etherx.jabber.org/streams``'``:` `u'``str``...``
| EVIL_CHARACTERS_RE = `re.compile(r'`(?u)``[`\x00`-`\x08\v\f\x0e`-`\x1f`]`')`
| _THREAD = `threading.local()`

Function Details | [hide private]

### serialize(element) |
Serialize an XMPP element. Utility function for debugging or logging. Parameters: `element` (`ElementTree.Element`) - the element to serialize Returns: `unicode` serialized element

Variables Details | [hide private]

  ### STANDARD_PREFIXES Value:
      {'http://etherx.jabber.org/streams': u'stream',
       'http://www.w3.org/XML/1998/namespace': u'xml'}