Package yapydata :: Package datatree :: Module synxml

Module synxml

source code

The YapyData.xml module provides XML.

Version: 0.1.1

Author: Arno-Can Uestuensoez

License: Artistic-License-2.0 + Forced-Fairplay-Constraints

Classes
  YapyDataXMLError
Common XML syntax error.
  DataTreeXML
Provides XML based read-only configuration of capabilities. This in particular comprises the priority based readout of values and defaults. The structure hereby includes specialization by subcomponents, where the missing value will be tried from the more general enclosing super component.
Functions
 
readout_data(xval, **kargs)
Scan tree into JSON representation. Uses recursive calls to readout_data through the logical tree spanned by xml.etree.
source code
Variables
  __uuid__ = "60cac28d-efe6-4a8d-802f-fa4fc94fa741"
  KEYWORDS = {'true': True, 'false': False, 'null': None,}
Function Details

readout_data(xval, **kargs)

source code 

Scan tree into JSON representation. Uses recursive calls to readout_data through the logical tree spanned by xml.etree.

Args:
xval:
The input tree as received from xml.etree.cElementTree.
kargs:
striproot:

Strips the root node. The named root node is mandatory due to the standard of W3C. Common other syntaxes such as JSON, YAML, and INI do not have unique baned root nodes at all. The striproot parameter removes the name root node, thus makes the structure of the scanned data tree compatible to the other syntax representations.

striproot := (
      True    # the named root node is removed
    | False   # the named root node is preserved
)

default := False

The parameter is processed in the first call of the recursion only, thus not passed to further calls.

Returns:
The resulting scanned data structure.
Raises:
pass-through
Decorators: