python 使用xpath解析含有命名空间(xmlns)的xml
解决办法:
from lxml import etree
xml = etree.parse("./cee.xml")
root = xml.getroot()
print(root.xpath(".//i:Reviews", namespaces={"i":"http://www.bazaarvoice.com/xs/PRR/StandardClientFeed/14.7"}))
更多语言参考
https://stackoverflow.com/questions/40796231/how-does-xpath-deal-with-xml-namespaces