Class defining a dict-branch object.
More...
Class defining a dict-branch object.
CMLDictBranch are nodes which can hold several CMLNodes as children.
◆ __init__()
| def carputils.cml.cmltree.CMLDictBranch.__init__ |
( |
|
self, |
|
|
|
parent, |
|
|
|
key |
|
) |
| |
◆ add_child()
| def carputils.cml.cmltree.CMLDictBranch.add_child |
( |
|
self, |
|
|
|
node |
|
) |
| |
◆ from_node()
| def carputils.cml.cmltree.CMLDictBranch.from_node |
( |
|
node | ) |
|
|
static |
Method to create a CMLDictBranch object.
A CMLDictBranch object is created from a
CMLNode object.
- Parameters
-
- Exceptions
-
| AttributeError | if node is not an instance of CMLNode |
- Returns
- The CMLDictBranch object created
◆ objectify()
| def carputils.cml.cmltree.CMLDictBranch.objectify |
( |
|
self | ) |
|
Objectify node and all child nodes.
- Returns
- If the key of the node is None, a CMLNamespace with all child nodes as attributes is returned, else a list containing the key and the CMLNamespace with all child nodes as attributes is returned
Reimplemented from carputils.cml.cmltree.CMLNode.
◆ serialize()
| def carputils.cml.cmltree.CMLDictBranch.serialize |
( |
|
self | ) |
|
Serialize node and all child nodes.
- Returns
- If the key of the node is None, a dictionary of all serialized child nodes as value is returned, else a list containing the key and the dictionary of all serialized child nodes as value is returned
Reimplemented from carputils.cml.cmltree.CMLNode.
◆ children
| carputils.cml.cmltree.CMLDictBranch.children |
list to hold the children
The documentation for this class was generated from the following file: