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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -