Get Element value with minidom with Python

前端 未结 9 2004
悲&欢浪女
悲&欢浪女 2020-11-29 18:01

I am creating a GUI frontend for the Eve Online API in Python.

I have successfully pulled the XML data from their server.

I am trying to grab the value from

9条回答
  •  执笔经年
    2020-11-29 18:47

    you can use something like this.It worked out for me

    doc = parse('C:\\eve.xml')
    my_node_list = doc.getElementsByTagName("name")
    my_n_node = my_node_list[0]
    my_child = my_n_node.firstChild
    my_text = my_child.data 
    print my_text
    

提交回复
热议问题