我有一个soapweb服务,我正在用Python发布一个请求,但是我不知道如何格式化返回。你知道吗
更新:Return是SUDS返回的“实例”
我只返回了40张唱片中的一张,包括:
print len(xmloutput)
print len(xmloutput[1].ODI_Outage)
print xmloutput[1].ODI_Outage[6]
这是我得到的回报:
2
40
(ODI_Outage){
metersAffected = 28
ERT =
(ert_time){
ert = "2013-07-19T20:50:00Z"
}
Incident =
(incident){
Location =
(location){
mainAddress =
(mailaddress){
townDetail =
(towninfo){
code = "L7L6W3"
name = "BURLINGTON"
stateOrProvince = "ONTARIO"
}
}
PositionPoints =
(coordinates){
xPosition = -79.7833492971
yPosition = 43.3923166879
}
}
}
}
如何获取此返回并为所有ODI\u对象创建XML或JSON?只是不知道该怎么办。你知道吗
要检查返回的类型,请使用:
print type(your_return_variable)
相关问题 更多 >
编程相关推荐