def parse_xml(self, xml): """ Parse the response from USPS into a dictionary @param xml: the xml to parse @return: a dictionary representing the XML response from USPS """ return [xmltodict(xml),]
def parse_xml(self, xml): """ Parse the response from USPS into a dictionary @param xml: the xml to parse @return: a dictionary representing the XML response from USPS """ items = list() for item in xml.getchildren():#xml.findall(self.SERVICE_NAME+'Response'): items.append(xmltodict(item)) return items
def parse_xml(self, xml): """ Parse the response from USPS into a dictionary @param xml: the xml to parse @return: a dictionary representing the XML response from USPS """ items = list() for item in xml.getchildren( ): #xml.findall(self.SERVICE_NAME+'Response'): items.append(xmltodict(item)) return items
def __init__(self, element): self.info = xmltodict(element) super(USPSXMLError, self).__init__(self.info['Description'])
def __init__(self, element): self.info = xmltodict(element) super(USPSXMLError, self).__init__(self.info['Description'])