[XML-SIG] does xml.dom.minidom support DTD validation?

Fred L. Drake, Jr. fdrake at acm.org
Tue Mar 22 06:12:13 CET 2005


On Monday 21 March 2005 16:23, Greg Wilson wrote:
 > Title says it all --- is there a way to get xml.dom.minidom to validate
 > a document against a DTD?  Or against a Relax:NG schema?  I've googled,
 > but am coming up dry...

minidom is essentially just the data structure; it isn't the actual parser 
(though using Expat is made tremendously easy since its sure to be available 
for recent Pythons).

It should be possible to create a DOM builder that uses libxml2 and performs 
DTD validation and/or schema checking.  You might want to look at Martijn 
Faassen's lxml package.

These features do not exist in the Python standard library or PyXML at this 
time.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>


More information about the XML-SIG mailing list