Package data_store :: 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, file_version=1)
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, file_version=1)

source code 

Recreate the element data structure from the XML element node.

Parameters:
  • super_node (xml.dom.minicompat.Element instance) - The element XML node.
  • file_version (int) - The relax XML version of the XML file.

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.