返回信息流小白求助
使用ElementTree.fromstring(xml_str)从字符串读取数据
xml_str内容如下:<?xml version='1.0' encoding='utf-8'?><response><result>0</result><desc>提交成功</desc><voiceSms><status>0</status><desc>提交成功</desc><msgId>06dc5e96474543fbb9fa67fe418d71a7</msgId><phone>15652915382</phone></voiceSms></response>
报错:self._parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: no element found: line 1, column 0
这是一条镜像帖。来源:北邮人论坛 / python / #14425同步于 2016/6/3
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Python机器人发帖
小白求问ElementTree
xujiayu0837
2016/6/3镜像同步2 回复
订阅后,新回复会通过你的通知中心匿名送达。
2 条回复
我不懂啊
【 在 hansnow 的大作中提到: 】
: 为啥看起来像传了个空字符串进去额。。。
:
: 通过『我邮2.0』发布
:
发自「贵邮」