Implementation of the XMPP serializer.
Single instance of this class should be used for a single stream and never
reused. It will keep track of prefixes declared on the root element and
used later.
|
__init__(self,
stanza_namespace,
extra_prefixes=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
add_prefix(self,
namespace,
prefix)
Add a new namespace prefix. |
|
|
|
emit_head(self,
stream_from,
stream_to,
stream_id=None,
version=u' 1.0 ' ,
language=None)
Return the opening tag of the stream root element. |
|
|
|
emit_tail(self)
Return the end tag of the stream root element. |
|
|
unicode , unicode
|
_split_qname(self,
name,
is_element)
Split an element of attribute qname into namespace and local
name. |
|
|
unicode
|
_make_prefix(self,
declared_prefixes)
Make up a new namespace prefix, which won't conflict
with _prefixes and prefixes declared in the current scope. |
|
|
unicode
|
_make_prefixed(self,
name,
is_element,
declared_prefixes,
declarations)
Return namespace-prefixed tag or attribute name. |
|
|
unicode
|
_emit_element(self,
element,
level,
declared_prefixes)
"Recursive XML element serializer. |
|
|
unicode
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|