validating XML

Dieter Maurer dieter at handshake.de
Wed Jun 13 12:16:45 EDT 2012


andrea crotti <andrea.crotti.0 at gmail.com> writes:

> Hello Python friends, I have to validate some xml files against some xsd
> schema files, but I can't use any cool library as libxml unfortunately.

Why?
It seems not very rational to implement a complex task (such as
XML-Schema validation) when there are ready solutions around.

> A Python-only validator might be also fine, but all the projects I've
> seen are partial or seem dead..
> So since we define the schema ourselves, I was allowed to only implement
> the parts of the huge XML definition that we actually need.
> Now I'm not quite sure how to do the validation myself, any suggestions?

I would look for a command line tool available
on your platform which performs the validation and
call this from Python.

--
Dieter




More information about the Python-list mailing list