Does python's xml.etree.ElementTree support DTD?

北城余情 提交于 2019-12-12 10:14:11

问题


Does xml.etree.ElementTree support DTD?

if it supports it, can I force ElementTree check a XML file against a dtd file, even if the XML file already has one. (internal or external).


回答1:


I'm not sure about xml.etree, but lxml supports DTD validation: http://lxml.de/validation.html



来源:https://stackoverflow.com/questions/5396135/does-pythons-xml-etree-elementtree-support-dtd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!