基于Dragonbaord 410c开发板的Python交互设计(3)——天气预报xml数据解析
Xml.readNext()
break
else:
weatherXml.readNext()
else:
weatherXml.readNext()
break
elif weatherXml.name()=="zhishus":
#print("zhishus:")
weatherXml.readNext()
while not weatherXml.atEnd():
if weatherXml.isStartElement():
if weatherXml.name()=="zhishu":
print("zhishu2:")
weatherXml.readNext()
while not weatherXml.atEnd():
if weatherXml.isStartElement():
if weatherXml.name()=="name":
self.weather_zhishu_name.append(weatherXml.readElementText())
#print("name")
#print(self.weather_zhishu_name)
weatherXml.readNext()
elif weatherXml.name()=="value":
self.weather_zhishu_vale.append(weatherXml.readElementText())
DragonBoard 410c python XML 相关文章: