所以,我正在尝试在 python 上处理一个 XML 文件。
我正在使用 minidom,因为我在 python 2.1 中并且更新到 3.6 没有任何变化。目前,我有这个
import xml.dom.minidom as minidom
import socket
print 'Getting the xml file'
# Get the xml contents
file = open('<filepath>')
#print file
# Get the root of the configuration file
print 'Parsing the xml'
procs = minidom.parse(file)
但我收到了这个错误
任何的想法?或者,更好的是,另一种解析 xml 的方法,而无需我编写自己的解析器......