how do I use empty namespaces in an lxml xpath query?

前端 未结 2 1658

I have an xml document in the following format:



        
2条回答
  •  南笙
    南笙 (楼主)
    2020-11-30 09:16

    Use findall method.

    for item in tree.findall('{http://www.w3.org/2005/Atom}entry'): 
        print item
    

提交回复
热议问题