Package xmpp :: Module protocol :: Class ErrorNode
[show private | hide private]
[frames | no frames]

Class ErrorNode

Node --+
       |
      ErrorNode


XMPP-style error element. In the case of stanza error should be attached to XMPP stanza. In the case of stream-level errors should be used separately.
Method Summary
  __init__(self, name, code, typ, text)
Create new error node object.
    Inherited from Node
  __delitem__(self, item)
Deletes node's attribute "item".
  __getitem__(self, item)
Returns node's attribute "item" value.
  __setitem__(self, item, val)
Sets node's attribute "item" value.
  __str__(self, parent, fancy)
  addChild(self, name, attrs, payload, namespace, node)
If "node" argument is provided, adds it as child node.
  addData(self, data)
Adds some CDATA to node.
  clearData(self)
Removes all CDATA from the node.
  delAttr(self, key)
Deletes an attribute "key"
  delChild(self, node, attrs)
Deletes the "node" from the node's childs list, if "node" is an instance.
  getAttr(self, key)
Returns value of specified attribute.
  getAttrs(self)
Returns all node's attributes as dictionary.
  getChildren(self)
Returns all node's child nodes as list.
  getData(self)
Returns all node CDATA as string (concatenated).
  getName(self)
Returns the name of node
  getNamespace(self)
Returns the namespace of node
  getParent(self)
Returns the parent of node (if present).
  getPayload(self)
Return the payload of node i.e.
  getTag(self, name, attrs, namespace)
Filters all child nodes using specified arguments as filter.
  getTagAttr(self, tag, attr)
Returns attribute value of the child with specified name (or None if no such attribute).
  getTagData(self, tag)
Returns cocatenated CDATA of the child with specified name.
  getTags(self, name, attrs, namespace, one)
Filters all child nodes using specified arguments as filter.
  has_attr(self, key)
Checks if node have attribute "key".
  setAttr(self, key, val)
Sets attribute "key" with the value "val".
  setData(self, data)
Sets node's CDATA to provided string.
  setName(self, val)
Changes the node name.
  setNamespace(self, namespace)
Changes the node namespace.
  setParent(self, node)
Sets node's parent to "node".
  setPayload(self, payload, add)
Sets node payload according to the list specified.
  setTag(self, name, attrs, namespace)
Same as getTag but if the node with specified namespace/attributes not found, creates such node and returns it.
  setTagAttr(self, tag, attr, val)
Creates new node (if not already present) with name "tag" and sets it's attribute "attr" to value "val".
  setTagData(self, tag, val, attrs)
Creates new node (if not already present) with name "tag" and (optionally) attributes "attrs" and sets it's CDATA to string "val".

Class Variable Summary
    Inherited from Node
int FORCE_NODE_RECREATION = 0                                                                     

Method Details

__init__(self, name, code=None, typ=None, text=None)
(Constructor)

Create new error node object. Mandatory parameter: name - name of error condition. Optional parameters: code, typ, text. Used for backwards compartibility with older jabber protocol.
Overrides:
xmpp.simplexml.Node.__init__

Generated by Epydoc 2.1 on Sun Dec 26 09:52:57 2004 http://epydoc.sf.net