SOAPpy 返回 XML 字符串。如何让库为我解析 xml?
我正在使用 SOAPpy,并深入了解 Python http://diveintopython3.ep.io/http- web-services.html 表示它应该返回一个字典。
我正在发出一个简单的请求,该请求返回一个包含转义字符的 xml 响应。
WSDLFILE = 'path/to/my/wsdl'
_server = WSDL.Proxy(WSDLFILE)
print _server.validServerMethod(client,password)
这会返回一个丑陋的 xml 字符串
任何人都可以帮我让它返回一个已经解析的响应吗? 感谢您抽出时间。
I am using SOAPpy, and Dive Into Python http://diveintopython3.ep.io/http-web-services.html says it should be returning a dictionary.
I am making a simple request, that returns an xml response that has the escape characters.
WSDLFILE = 'path/to/my/wsdl'
_server = WSDL.Proxy(WSDLFILE)
print _server.validServerMethod(client,password)
This returns a big ugly str of xml<?xml version="1.0" encoding="utf-8"?><it....
Can anyone help me with getting this to return an already parsed response?
Thank you for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你需要转义它: http://wiki.python.org/moin/EscapingHtml
I think you need to unescape it : http://wiki.python.org/moin/EscapingHtml