Every year or so someone seems to ask the same question. Is there a good Python library to validate xml files comparing them to an xsd schema? The closest I've found is suggestions involving lxml, which unfortunately is not pure python (based on a few C libraries)
Asked
Active
Viewed 4,545 times
2
-
Look Here: http://stackoverflow.com/questions/299588/validating-with-an-xml-schema-in-python – Michael Allan Jackson Feb 28 '12 at 07:33
2 Answers
5
I would be surprised to find any pure Python XSD validation libraries. I am aware of the following alternatives for CPython, but they all depend on non-Python code:
- lxml (based on libxml2)
- libxml2 Python bindings
- XSV
- MSXML with PyWin32

mzjn
- 48,958
- 13
- 128
- 248
-
I ended up rolling with lxml. I was originally worried about creating an executable for windows from this and the library not being included. Thankfully with what I'm working with, it looks like I'm good to go – Sam Johnson Jul 17 '11 at 05:43