def xml_to_json(xml_doc):
    doc_el = xml_doc.documentElement
    json_doc = {doc_el.nodeName: xml_node_to_json(doc_el)}

    return json.dumps(json_doc)
Returns a serialized json doc string generated from the given xml
dataset/ETHPy150Open jahlborn/appengine-rest-server/src/main/python/rest/__init__.py/xml_to_json