作者:墮天使love蘇蘇_709 | 来源:互联网 | 2023-05-31 15:18
ImprettynewtoXMLandIwaswonderinghowwouldIparse,sort,andprintval1toval4inpython?
I'm pretty new to XML and I was wondering how would I parse, sort, and print val1 to val4 in python? With my research I found xml.dom
or xml.etree
was used a lot but I'm having trouble finding the correct functions to use to parse the through the XML tree and print out what I need.
我对XML很新,我想知道如何在python中解析,排序和打印val1到val4?通过我的研究,我发现xml.dom或xml.etree被大量使用,但我无法找到正确的函数来解析XML树并打印出我需要的东西。
- val1
- val2
- val3
- val4
4 个解决方案