Python Parsing XML Response -
i have soap response trying parse elementtree
doc = et.parse(response_xml) cust in doc.findall('.//{http://www.starstandards.org/webservices/2005/10/transport}content'): custnumber = cust.findtext('{http://www.starstandards.org/webservices/2005/10/transport}customernumber') custfname = cust.findtext('{http://www.starstandards.org/webservices/2005/10/transport}firstname') custlname = cust.findtext('{http://www.starstandards.org/webservices/2005/10/transport}lastname') return custnumber, custfname, custlname
i trying information out of response , keep getting following error:
no such file or directory
does response_xml
need saved file before can parse it? why can't use memory?
et.parse()
needs file name. might want try et.fromstring()
instead.
Comments
Post a Comment