我如何获得下面的etree节点,在这里我不必用名称空间限定每个操作?例如:
>>> c='''<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>http://www.vudu.com/sitemap-static.xml</loc></sitemap>
</sitemapindex>'''
>>> node=etree.fromstring(c)
>>> node.xpath('//loc')
[]
我如何建立node
这样我就可以做node.xpath(''/loc')
并得到结果
目前没有回答
相关问题 更多 >
编程相关推荐