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