Package data :: Module data_classes :: Class Element
[hide private]
[frames] | no frames]

Class Element

source code


Empty data container.

Instance Methods [hide private]
 
__init__(self, name='element', desc='container object')
Initialise some class variables.
source code
 
__repr__(self)
repr(x)
source code
 
from_xml(self, super_node)
Recreate the element data structure from the XML element node.
source code
bool
is_empty(self)
Method for testing if the Element container is empty.
source code
 
to_xml(self, doc, element)
Create an XML element for the container.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name='element', desc='container object')
(Constructor)

source code 

Initialise some class variables.

Parameters:
  • name (str) - The name of the object.
  • desc (str) - The description of the object.
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

from_xml(self, super_node)

source code 

Recreate the element data structure from the XML element node.

Parameters:
  • super_node (xml.dom.minicompat.Element instance) - The element XML node.

is_empty(self)

source code 

Method for testing if the Element container is empty.

Returns: bool
True if the Element container is empty, False otherwise.

to_xml(self, doc, element)

source code 

Create an XML element for the container.

Parameters:
  • doc (xml.dom.minidom.Document instance) - The XML document object.
  • element (XML element object) - The element to add the data container XML element to.