Exemplo n.º 1
0
 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),]
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 def __init__(self, element):
     self.info = xmltodict(element)
     super(USPSXMLError, self).__init__(self.info['Description'])
Exemplo n.º 5
0
 def __init__(self, element):
     self.info = xmltodict(element)
     super(USPSXMLError, self).__init__(self.info['Description'])