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 的新手,所以我不知道应该在 python 中使用哪个 api。直到现在我都使用了 xmlproc,但我听说它不再开发了。
我基本上只有一个要求:我想根据我可以在我的程序中选择的 dtd 进行验证。我不能插入文档类型的东西。
性能并不重要,所以我想使用现有的最简单的 api。
用什么?你们有一个简单的例子吗?
对于我当前的项目,我使用的是lxml,它相当容易使用。本页描述了使用 DTD 进行的验证