lxml etree xmlparser remove unwanted namespace

前端 未结 4 2152
感动是毒
感动是毒 2020-11-29 00:04

I have an xml doc that I am trying to parse using Etree.lxml


  
1&
4条回答
  •  日久生厌
    2020-11-29 00:12

    Try using Xpath:

    dom.xpath("//*[local-name() = 'Body']")
    

    Taken (and simplified) from this page, under "The xpath() method" section

提交回复
热议问题