Module relax_xml
source code
Module containing generic fns for creation and parsing of XML
representations of python objects.
|
|
|
|
|
xml_to_object(elem,
base_object=None,
set_fn=None,
blacklist=[ ] )
Convert the XML elements into python objects, and place these into
the base object. |
source code
|
|
Imports:
set_printoptions,
array,
float32,
float64,
inf,
nan,
float16,
float128,
search,
strip,
floatAsByteArray,
packBytesAsPyFloat
fill_object_contents(doc,
elem,
object=None,
blacklist=[ ] )
| source code
|
Place all simple python objects into the XML element namespace.
- Parameters:
doc (xml.dom.minidom.Document instance) - The XML document object.
elem (XML element object) - The element to add all python objects to.
object (instance) - The python class instance containing the objects to add.
blacklist (list of str) - A list of object names to exclude.
|
Convert the node value to a python expression.
- Parameters:
elem (xml.dom.minidom.Element instance) - The XML element.
|
xml_to_object(elem,
base_object=None,
set_fn=None,
blacklist=[ ] )
| source code
|
Convert the XML elements into python objects, and place these into the
base object.
- Parameters:
elem (xml.dom.minidom.Element instance) - The element to extract all python objects from.
base_object (instance) - The python class instance to place the objects into.
set_fn (function) - A function used to replace setattr for placing the object into
the base object.
blacklist (list of str) - A list of object names to exclude.
|