search for: validatingapp

Displaying 1 result from an estimated 1 matches for "validatingapp".

2010 Oct 08
7
[PATCH] Replace pyxml/xmlproc-based XML validator with lxml based one.
...r def log(_, msg): #print "> " + msg @@ -118,62 +121,58 @@ Use this if possible as it gives nice error messages """ - dtd = xmldtd.load_dtd(self.dtd) - parser = xmlproc.XMLProcessor() - parser.set_application(xmlval.ValidatingApp(dtd, parser)) - parser.dtd = dtd - parser.ent = dtd - parser.parse_resource(file) - + try: + dtd = etree.DTD(open(self.dtd, ''r'')) + except IOError: + # The old code did neither raise an exception here, nor + # did...