Find element with attribute with minidom

前端 未结 3 2237
梦毁少年i
梦毁少年i 2021-02-15 10:07

Given



        
3条回答
  •  后悔当初
    2021-02-15 10:55

    You don't -- the DOM API, somewhat poorly designed (by w3c, not by Python!-) doesn't have such a search function to do the iteration for you. Either accept the need to loop (not through every tag in general, but through all with a given tag name), or upgrade to a richer interface, such as BeautifulSoup or lxml.

提交回复
热议问题