Reading XML file and fetching its attributes value in Python

后端 未结 7 648
情歌与酒
情歌与酒 2020-12-03 15:56

I have this XML file:


  virtual bug
  66523dfdf555dfd
  
          


        
相关标签:
7条回答
  • 2020-12-03 16:51

    etree, with lxml probably:

    root = etree.XML(MY_XML)
    uuid = root.find('uuid')
    print uuid.text
    
    0 讨论(0)
提交回复
热议问题