(form)
return to_return
Returns a OrderedDict of the top level tags found in the xml, in the
        order they are found.

        The actual values are taken from the form JSON data and not from the XML
Returns a OrderedDict of the top level tags found in the xml, in the
        order they are found.
Returns a OrderedDict of the top level tags found in the xml in the order they are found .
def _top_level_tags(form):
        """
        Returns a OrderedDict of the top level tags found in the xml, in the
        order they are found.

        The actual values are taken from the form JSON data and not from the XML
        """
        to_return = OrderedDict()

        element = form.get_xml_element()
        if element is None:
            return OrderedDict(sorted(form.form_data.items()))

        for child in element:
            # fix {namespace}tag format forced by ElementTree in certain cases (eg, <reg> instead of <n0:reg>)
            key = child.tag.split('}')[1] if child.tag.startswith("{") else child.tag
            if key == "Meta":
                key = "meta"
            to_return[key] = form.get_data('form/' + key)
        return to_return
def _top_level_tags ( form ) : to_return = OrderedDict ( ) element = form . get_xml_element ( ) if element is None : return OrderedDict ( sorted ( form . form_data . items ( ) ) ) for child in element : # fix {namespace}tag format forced by ElementTree in certain cases (eg, <reg> instead of <n0:reg>) key = child . tag . split ( '}' ) [ 1 ] if child . tag . startswith ( "{" ) else child . tag if key == "Meta" : key = "meta" to_return [ key ] = form . get_data ( 'form/' + key ) return to_return