pytams.xmlutils
Module Contents
Functions
|
Manually cast XML elements reads. |
|
Return an Element from a dictionnary. |
|
Return an dictionnary an Element. |
|
Return an Element from two args. |
|
Return a snapshot in XML elemt format. |
|
Return snapshot data from an XML snapshot elemt. |
- pytams.xmlutils.manualCast(elem: xml.etree.ElementTree.Element)[source]
Manually cast XML elements reads.
- pytams.xmlutils.dict_to_xml(tag: str, d) xml.etree.ElementTree.Element [source]
Return an Element from a dictionnary.
- Parameters:
tag – a root tag
d – a dictionary
- pytams.xmlutils.xml_to_dict(elem: xml.etree.ElementTree.Element) dict [source]
Return an dictionnary an Element.
- Parameters:
tag – a root tag
elem – an etree element
- pytams.xmlutils.new_element(key: str, val) xml.etree.ElementTree.Element [source]
Return an Element from two args.
- Parameters:
key – the element key
val – the element value
- pytams.xmlutils.make_xml_snapshot(idx: int, time: float, score: float, state) xml.etree.ElementTree.Element [source]
Return a snapshot in XML elemt format.
- Parameters:
idx – snapshot index
time – the time stamp
score – the snapshot score function
state – the associated state
- pytams.xmlutils.read_xml_snapshot(snap: xml.etree.ElementTree.Element)[source]
Return snapshot data from an XML snapshot elemt.
- Parameters:
snap – an XML snapshot elemt