有没有办法在elementtree.ElementTree中忽略标记名称中的XML命名空间?我尝试打印所有technicalContact标签:foriteminroot.getiterator(tag='{http://www.example.com}technicalContact'):printitem.tag,item.text我得到类似的东西:{http://www.example.com}technicalContactblah@example.com但我真正想要的是:technicalContactblah@example.com有没有办法只显示后缀(无xmlns),或者
有没有办法在elementtree.ElementTree中忽略标记名称中的XML命名空间?我尝试打印所有technicalContact标签:foriteminroot.getiterator(tag='{http://www.example.com}technicalContact'):printitem.tag,item.text我得到类似的东西:{http://www.example.com}technicalContactblah@example.com但我真正想要的是:technicalContactblah@example.com有没有办法只显示后缀(无xmlns),或者