Package pyxmpp :: Package jabber :: Module muccore :: Class MucXBase
[show private | hide private]
[frames | no frames]

Type MucXBase

                object --+    
                         |    
StanzaPayloadWrapperObject --+
                             |
                            MucXBase

Known Subclasses:
MucOwnerX, MucUserX, MucX

Base class for MUC-specific stanza payload - wrapper around an XML element.
Method Summary
  __init__(self, xmlnode, copy, parent)
Copy MucXBase object or create a new one, possibly based on or wrapping an XML node.
  __del__(self)
  free(self)
Unlink and free the XML node owned by self.
  free_borrowed(self)
Detach the XML node borrowed by self.
str serialize(self)
Serialize self as XML.
list of libxml2.xmlNode xpath_eval(self, expr)
Evaluate XPath expression in context of self.xmlnode.
    Inherited from StanzaPayloadWrapperObject
libxml2.xmlNode or libxml2.xmlDoc as_xml(self, parent, doc)
Get the XML representation of self.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Instance Variable Summary
  xmlnode: the wrapped XML node

Class Variable Summary
str element = 'x'
NoneType ns = None                                                                  

Method Details

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

Copy MucXBase object or create a new one, possibly based on or wrapping an XML node.
Parameters:
xmlnode - is the object to copy or an XML node to wrap.
           (type=MucXBase or libxml2.xmlNode)
copy - when True a copy of the XML node provided will be included in self, the node will be copied otherwise.
           (type=bool)
parent - parent node for the created/copied XML element.
           (type=libxml2.xmlNode)
Overrides:
__builtin__.object.__init__

free(self)

Unlink and free the XML node owned by self.

free_borrowed(self)

Detach the XML node borrowed by self.

serialize(self)

Serialize self as XML.
Returns:
serialized self.xmlnode.
           (type=str)

xpath_eval(self, expr)

Evaluate XPath expression in context of self.xmlnode.
Parameters:
expr - the XPath expression
           (type=unicode)
Returns:
the result of the expression evaluation.
           (type=list of libxml2.xmlNode)

Instance Variable Details

xmlnode

the wrapped XML node

Class Variable Details

element

Type:
str
Value:
'x'                                                                    

ns

Type:
NoneType
Value:
None