Package pyxmpp :: Package jabber :: Module muccore :: Class MucXBase

[hide private]

# Class MucXBase

source code

                            object --+
                                     |
    objects.StanzaPayloadWrapperObject --+
                                         |
                                        MucXBase

Known Subclasses:
  - MucUserX
  - , MucOwnerX
  - , MucX

Base class for MUC-specific stanza payload - wrapper around an XML element.

Instance Methods | [hide private]

__init__(self, xmlnode=None, copy=True, parent=None) Copy MucXBase object or create a new one, possibly based on or wrapping an XML node. | source code

__del__(self) | source code

free(self) Unlink and free the XML node owned by `self`. | source code

free_borrowed(self) Detach the XML node borrowed by `self`. | source code

list of `libxml2.xmlNode`

xpath_eval(self, expr) Evaluate XPath expression in context of self.xmlnode. | source code

`str`

serialize(self) Serialize `self` as XML. | source code

Inherited from `objects.StanzaPayloadWrapperObject`: `as_xml` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]

| element = ``'``x``'``
| ns = `None` hash(x)

Instance Variables | [hide private]

: `libxml2.xmlNode` | xmlnode : XML node of the object.

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, xmlnode=None, copy=True, parent=None)
(Constructor)

source code

Copy MucXBase object or create a new one, possibly based on or wrapping an XML node.

Parameters:
  - `xmlnode` (: MucXBase or `libxml2.xmlNode`) - : is the object to copy or an XML node to wrap.
  - `copy` (: `bool`) - : when `True` a copy of the XML node provided will be included in `self`, the node will be copied otherwise.
  - `parent` (: `libxml2.xmlNode`) - : parent node for the created/copied XML element.
Overrides: object.__init__

### xpath_eval(self, expr)

source code

Evaluate XPath expression in context of self.xmlnode.

Parameters:
  - `expr` (: `unicode`) - : the XPath expression
Returns: list of `libxml2.xmlNode`
  the result of the expression evaluation.

### serialize(self)

source code

Serialize `self` as XML.

Returns: `str`
  serialized self.xmlnode.