'Not the smartest deserializer on the planet. At the request level,
it first tries to output the deserialized subelement called "object"
or "objects" and falls back to deserializing based on hinted types in
the XML element attribute "type".'

def from_etree(self, data):

    if (data.tag == u'request'):
        elements = data.getchildren()
        for element in elements:
            if (element.tag in (u'object', u'objects')):
                return self.from_etree(element)
        return {element.tag: self.from_etree(element) for element in elements}
    elif ((data.tag == u'object') or (data.get(u'type') == u'hash')):
        return {element.tag: self.from_etree(element) for element in data.getchildren()}
    elif ((data.tag == u'objects') or (data.get(u'type') == u'list')):
        return [self.from_etree(element) for element in data.getchildren()]
    else:
        type_string = data.get(u'type')
        if (type_string in (u'string', None)):
            return data.text
        elif (type_string == u'integer'):
            return int(data.text)
        elif (type_string == u'float'):
            return float(data.text)
        elif (type_string == u'boolean'):
            if (data.text == u'True'):
                return True
            else:
                return False
        else:
            return None
