Public Member Functions | |
def | __init__ |
def | __str__ |
def | cloneTree |
def | createElement |
def | getRootNode |
def | getTree |
def | printTree |
def | setExternalCacheUsage |
def | unlink |
def | useCaching |
Public Attributes | |
xmlIf | |
Private Attributes | |
__tree | |
__useCaching |
XML tree wrapper API. Contains a DOM tree or an elementtree (depending on used XML parser)
Definition at line 152 of file xmlifApi.py.
def pymavlink.generator.lib.genxmlif.xmlifApi.XmlTreeWrapper.__init__ | ( | self, | |
xmlIf, | |||
tree, | |||
useCaching | |||
) |
Constructor of wrapper class XmlTreeWrapper. Input parameter: 'xmlIf': used XML interface class 'tree': DOM tree or elementtree which is wrapped by this object 'useCaching': 1 if caching shall be used inside genxmlif, otherwise 0
Definition at line 158 of file xmlifApi.py.
Return the string representation of the contained XML tree.
Definition at line 253 of file xmlifApi.py.
Creates a copy of a whole XML DOM tree.
Definition at line 186 of file xmlifApi.py.
def pymavlink.generator.lib.genxmlif.xmlifApi.XmlTreeWrapper.createElement | ( | self, | |
tupleOrLocalName, | |||
attributeDict = None , |
|||
curNs = [] |
|||
) |
Create an ElementWrapper object. Input parameter: tupleOrLocalName: tag name of element node to be created (tuple of namespace and localName or only localName if no namespace is used) attributeDict: attributes for this elements curNs: namespaces for scope of this element Returns an ElementWrapper object containing the created element node.
Definition at line 171 of file xmlifApi.py.
Retrieve the wrapper object of the root element of the contained XML tree. Returns the ElementWrapper object of the root element.
Definition at line 197 of file xmlifApi.py.
Retrieve the contained XML tree. Returns the contained XML tree object (internal DOM tree wrapper or elementtree).
Definition at line 205 of file xmlifApi.py.
def pymavlink.generator.lib.genxmlif.xmlifApi.XmlTreeWrapper.printTree | ( | self, | |
prettyPrint = 0 , |
|||
printElementValue = 1 , |
|||
encoding = None |
|||
) |
Return the string representation of the contained XML tree. Input parameter: 'prettyPrint': aligns the columns of the attributes of childNodes 'printElementValue': controls if the lement values are printed or not. Returns a string with the string representation of the whole XML tree.
Definition at line 213 of file xmlifApi.py.
Set external cache usage for the whole tree unlink commands are ignored if used by an external cache Input parameter: used: 0 or 1 (used by external cache)
Definition at line 235 of file xmlifApi.py.
Break circular references of the complete XML tree. To be called if the XML tree is not longer used => garbage collection!
Definition at line 245 of file xmlifApi.py.
Return 1 if caching should be used for the contained XML tree.
Definition at line 230 of file xmlifApi.py.
Definition at line 164 of file xmlifApi.py.
Definition at line 164 of file xmlifApi.py.
Definition at line 164 of file xmlifApi.py.