This utility method converts an XML string into a JSON string, which for some users will be easier to work with than an XML string. An example for this helper method can be found below.
attribute
type
description
xmlstring
String
an XML string
strip
Bool
string whitespace (default: True)
You can use simplejson.dumps() or json.dumps() to convert the JSON string into a JSON object. Tag text is accessed using standard key[value] syntax, and tag attributes are accessed using @attrib syntax. Any tails within a tag are accessed using #tail syntax.