sarkit.xmlhelp.XmlHelper
- class XmlHelper(element_tree, xsdhelper)
Base Class for generic XmlHelpers, which provide methods for transcoding data between XML and more convenient Python objects.
- Parameters:
- element_tree
lxml.etree.ElementTree An XML element tree containing the data being operated on.
- xsdhelper
XsdHelper XsdHelper object corresponding to
element_tree’s schema
- element_tree
Methods
load(pattern)Find and load the first subelement matching
patterninelement_tree.load_elem(elem)Decode
elem(an XML element) to a Python object.set(pattern, val)Find and set the first subelement matching
patterninelement_treeusingval.set_elem(elem, val)Encode
val(a Python object) into the XML elementelem.