"Greg Wilson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Title says it all --- is there a way to get xml.dom.minidom to validate a > document against a DTD?
Maybe, depending on what "document" means here. If you have PyXML installed, you can use its validating parser to feed minidom: import xml.sax.sax2exts import xml.sax.handler parser = xml.sax.sax2exts.XMLValParserFactory.make_parser() doc = xml.dom.minidom.parse(filename, parser=parser) Validation errors get raised as xml.sax.SaxParseException, or you can set an error handler using parser.SetErrorHandler. > Or against a Relax:NG schema? Not that I know of. James _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig