Cantera.XML
index
/usr/local/lib/python2.6/dist-packages/Cantera/XML.py

This module provides the Python interface to C++ class XML_Node.

 
Modules
       
Cantera._cantera
Cantera.exceptions
string
tempfile
types

 
Classes
       
XML_Node

 
class XML_Node
    A node in an XML tree.
 
  Methods defined here:
__call__(self, loc='')
Get the value using the syntax node(loc).
__del__(self)
Delete the node. Does nothing if this node is only a wrapper.
__getitem__(self, key)
Get an attribute using the syntax node[key]
__init__(self, name='--', src='', wrap=0, root=None, preprocess=0, debug=0)
Return an instance representing a node in an XML tree.
 
If 'src' is specified, then the XML tree found in file 'src' is
constructed, and this node forms the root of the tree. The XML tree
is saved, and a second call with the same value for 'src' will use
the XML tree already read in, instead of reading it in again. 
 
If 'wrap' is greater than zero, then only a Python wrapper is
created - no new kernel object results.
__int__(self)
Conversion to integer.
__repr__(self)
__setitem__(self, key, value)
Set a new attribute using the syntax node[key] = value.
addAttrib(self, key, value)
Add attribute 'key' with value 'value'.
addChild(self, name, value='')
Add a child with tag 'name', and set its value if the value
parameter is supplied.
addComment(self, comment)
Add a comment.
attrib(self, key)
Return attribute 'key', or the empty string if this attribute
does not exist.
child(self, loc='', id='', name='')
children(self, tag='')
Return a list of all child elements, or just those with a specified
tag name.
hasAttrib(self, key)
id(self)
Return the id attribute if one exists, or else the empty string.
nChildren(self)
Number of child elements.
removeChild(self, child)
Remove a child and all its descendants.
tag(self)
value(self, loc='')
Return the value of this node, or, if
the loc argument is supplied, of the node with relative
address 'loc'.
write(self, file)

 
Functions
       
clear_XML()
getFloatArray(node, convert_units=0)