Package TestON :: Package core :: Module xmldict
[hide private]
[frames] | no frames]

Module xmldict

source code

Created on 03-Dec-2012


Author: Anil Kumar (anilkumar.s@paxterrasolutions.com)

Functions [hide private]
 
xml_to_dict(root_or_str, strict=True)
Converts `root_or_str` which can be parsed xml or a xml string to dict.
source code
 
dict_to_xml(dict_xml)
Converts `dict_xml` which is a python dict to corresponding xml.
source code
 
_to_xml(el)
Converts `el` to its xml representation.
source code
 
_extract_attrs(els)
Extracts attributes from dictionary `els`.
source code
 
_dict_to_xml(els)
Converts `els` which is a python dict to corresponding xml.
source code
 
_is_xml_el_dict(el)
Returns true if `el` is supposed to be a dict.
source code
 
_is_xml_el_list(el)
Returns true if `el` is supposed to be a list.
source code
 
_str_to_datetime(date_str) source code
 
_str_to_boolean(bool_str) source code
 
_from_xml(el, strict)
Extracts value of xml element element `el`.
source code
 
_val_and_maybe_convert(el)
Converts `el.text` if `el` has attribute `type` with valid value.
source code
 
_list_from_xml(els, strict)
Converts xml elements list `el_list` to a python list.
source code
 
_dict_from_xml(els, strict)
Converts xml doc with root `root` to a python dict.
source code
Function Details [hide private]

_extract_attrs(els)

source code 

Extracts attributes from dictionary `els`. Attributes are keys which start with '@'

_is_xml_el_dict(el)

source code 

Returns true if `el` is supposed to be a dict. This function makes sense only in the context of making dicts out of xml.

_is_xml_el_list(el)

source code 

Returns true if `el` is supposed to be a list. This function makes sense only in the context of making lists out of xml.