Parsing XML scheme (xsd) to python objects

B

Bizarro-02

I have a XML scheme (xsd) from which I have created with xjc (a java
binding compiler (JAXB)) my java objects with all the get and set
methods. Now I have to use this scheme and do the same in python but I
can't find a tool which can read the scheme. I already tried
generateDS.py but it couldn't parse the data.

Does anyone know a tool which compiles my scheme and creates an object
library in python?


Regards,
Matthias
 
C

Chris McDonough

You don't just want to parse the XSD data because there lots of XML
parsers for Python. You want to validate documents against the schema,
right? I haven't yet seen a good XML schema validator for Python.
libxml2 has good bindings for validating XML against RelaxNG schemas.

- C
 
B

Bizarro-02

Yes, documents should also be validated against the schema. I finally
managed to compile my schema with generateDS.py but I haven't tested
the result because of my poor knowledge of Python. So I have to wait
until the group does which wanted to use my schema.
Thanks for your answer!

Matthias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top