Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
xml.etree.ElementTree 是否支持 DTD?
如果它支持它,我可以强制 ElementTree 根据 dtd 文件检查 XML 文件,即使 XML 文件已经有一个。(内部或外部)。
我不确定xml.etree,但lxml支持 DTD 验证: http: //lxml.de/validation.html
xml.etree
lxml