Package Peach :: Package Engine :: Module dom :: Class ElementWithChildren
[hide private]

Class ElementWithChildren

source code


Contains functions that cause Element to act as a hash table and array for children. Also children can be accessed by name via self.children.name.

Instance Methods [hide private]
 
__init__(self, name=None, parent=None) source code
 
genElementsByType(self, type)
Will generate (yield) all values of a specific type in the tree starting with us.
source code
 
printDomMap(self, level=0)
Print out a map of the dom.
source code
 
verifyDomMap(self)
Verify parent child relationship across DOM Tree
source code
 
toXmlDom(self, parent, dict)
Convert to an XML DOM boject tree for use in xpath queries.
source code
 
updateFromXmlDom(self, node, dict)
Update our object based on an XML DOM object.
source code
 
setDefaults(self, data)
Set data elements defaultValue based on a Data object.
source code
 
append(self, obj) source code
 
index(self, obj) source code
 
insert(self, index, obj) source code
 
firstChild(self) source code
 
lastChild(self) source code
 
has_key(self, name) source code
 
__len__(self) source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, value) source code
 
__delitem__(self, key) source code
 
__iter__(self) source code
 
__contains__(self, item) source code

Inherited from Element: copy, getFullDataName, getFullname, getRoot, hasChildNode, nextSibling, previousSibling

Static Methods [hide private]

Inherited from Element: getUniqueName

Class Variables [hide private]

Inherited from Element: GuidRegex

Instance Variables [hide private]
  _children
List of children (in order)
  _childrenHash
Dicitonary of children (by name)
  children
Children object, has children as attributes by name

Inherited from Element: elementType, hasChildren, name, node, parent, ref

Method Details [hide private]

__init__(self, name=None, parent=None)
(Constructor)

source code 
Overrides: Element.__init__

genElementsByType(self, type)

source code 

Will generate (yield) all values of a specific type in the tree starting with us.

Overrides: Element.genElementsByType

printDomMap(self, level=0)

source code 

Print out a map of the dom.

Overrides: Element.printDomMap

toXmlDom(self, parent, dict)

source code 

Convert to an XML DOM boject tree for use in xpath queries.

Overrides: Element.toXmlDom

updateFromXmlDom(self, node, dict)

source code 

Update our object based on an XML DOM object. All we are taking for now is defaultValue.

Overrides: Element.updateFromXmlDom