python的xml.etree.ElementTree是否支持DTD? [英] Does python's xml.etree.ElementTree support DTD?
本文介绍了python的xml.etree.ElementTree是否支持DTD?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
xml.etree.ElementTree是否支持DTD?
Does xml.etree.ElementTree support DTD?
如果支持,是否可以强制ElementTree对照dtd文件检查XML文件,即使XML文件已经有一个。 (内部或外部)。
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).
推荐答案
我不确定 xml.etree
,但 lxml
支持DTD验证:
http://lxml.de/validation.html
I'm not sure about xml.etree
, but lxml
supports DTD validation:
http://lxml.de/validation.html
这篇关于python的xml.etree.ElementTree是否支持DTD?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文