Package pyxmpp :: Module error :: Class StreamErrorNode
[show private | hide private]
[frames | no frames]

Class StreamErrorNode

ErrorNode --+
            |
           StreamErrorNode


Stream error element.
Method Summary
  __init__(self, xmlnode_or_cond, copy, parent)
Initialize a StreamErrorNode object.
unicode get_message(self)
Get the message for the error.
    Inherited from ErrorNode
  __del__(self)
libxml2.xmlNode add_custom_condition(self, ns, cond, content)
Add custom condition element to the error.
  downgrade(self)
Downgrade an XMPP error element to the legacy format.
  free(self)
Free the associated XML node.
  free_borrowed(self)
Free the associated "borrowed" XML node.
libxml2.xmlNode get_condition(self, ns)
Get the condition element of the error.
unicode get_text(self)
Get the description text from the error element.
bool is_legacy(self)
Check if the error node is a legacy error element.
str serialize(self)
Serialize the element node.
  upgrade(self)
Upgrade a legacy error element to the XMPP compliant one.
  xpath_eval(self, expr, namespaces)
Evaluate XPath expression on the error element.

Method Details

__init__(self, xmlnode_or_cond, copy=1, parent=None)
(Constructor)

Initialize a StreamErrorNode object.
Parameters:
xmlnode_or_cond - XML node to be wrapped into this object or the primary (defined by XMPP specification) error condition name.
           (type=libxml2.xmlNode or unicode)
copy - When True then the XML node will be copied, otherwise it is only borrowed.
           (type=bool)
parent - Parent node for the XML node to be copied or created.
           (type=libxml2.xmlNode)
Overrides:
pyxmpp.error.ErrorNode.__init__

get_message(self)

Get the message for the error.
Returns:
the error message.
           (type=unicode)