0
我有我試圖用ElementTree
的Python解析XML響應
doc = ET.parse(response_xml)
for 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
我試圖得到信息的響應解析SOAP響應,我不斷收到以下錯誤:
No such file or directory
response_xml
是否需要保存到文件才能解析它?爲什麼我不能從內存中使用它?
謝謝你,似乎在做伎倆。 – DarthOpto