[XML-SIG] XML Schema Validator

Martijn Faassen faassen at infrae.com
Thu Jun 15 19:00:39 CEST 2006

Mircea Amarascu wrote:
> Hello,
> What is the best Python tool for XML Schema validations? I only need a
> True/False response when I check the conformance of an XML document
> with a given schema.
> Is there a Python library that fully implements this feature?

There was just a discussion on the list a last week, so I'll just 
summarize from that:

Henry Thompson mentioned XSV:

 > XSV [1] is written in Python (uses the LT XML low-level XML library).
 > [1] http://www.ltg.ed.ac.uk/~ht/xsv-status.html

I mentioned lxml (which I created):


This explains how to use it with XML Schemas:


This requires libxml2 and libxslt (C libraries) to be installed. lxml 
implements XML schema only as far as libxml2 implements it -- whether 
that's sufficient to your purposes depends.

There's also another Python binding for libxml2 that gets included with 
libxml2 itself. It's much less friendly to the Python programmer than 
lxml, but you may want to try it if for some reason you cannot use lxml.



More information about the XML-SIG mailing list