(xml_string)
return json_form
takes xform payload as xml_string and returns the equivalent json
    i.e. the json that will show up as xform.form
takes xform payload as xml_string and returns the equivalent json
    i.e. the json that will show up as xform.form
takes xform payload as xml_string and returns the equivalent json i . e . the json that will show up as xform . form
def convert_xform_to_json(xml_string):
    """
    takes xform payload as xml_string and returns the equivalent json
    i.e. the json that will show up as xform.form

    """

    try:
        name, json_form = xml2json.xml2json(xml_string)
    except xml2json.XMLSyntaxError as e:
        from couchforms import XMLSyntaxError
        raise XMLSyntaxError('Invalid XML: %s' % e)
    json_form['#type'] = name
    return json_form
def convert_xform_to_json ( xml_string ) : try : name , json_form = xml2json . xml2json ( xml_string ) except xml2json . XMLSyntaxError as e : from couchforms import XMLSyntaxError raise XMLSyntaxError ( 'Invalid XML: %s' % e ) json_form [ '#type' ] = name return json_form