dtd

DTD Validation Failing (Python)

DTD Validation Failing (Python) Question: I am doing a Python script which generates files from a XML + DTD passed as inputs, but it fails because the DTD cannot be validated, while I do not see any problem “visually”. Here is my code : DTD = ‘scenario.dtd’ def OpenXML(xmlDesc): dtd = libxml2.parseDTD(None,DTD) ctxt = libxml2.newValidCtxt() …

Total answers: 1

How do I validate xml against a DTD file in Python

How do I validate xml against a DTD file in Python Question: I need to validate an XML string (and not a file) against a DTD description file. How can that be done in python? Asked By: fulmicoton || Source Answers: Another good option is lxml’s validation which I find quite pleasant to use. A …

Total answers: 2