[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

xsd, data binding. Modern approach?

Vladimir Kropylev

2/29/2008 10:47:00 AM

Hi,

What is the most actual approach to python XML data-binding?
The answers given by google seam to be rather outdated. Can't believe
nothing's changed since 2003.

To be concrete, i've faced the following task:
I HAVE:
- XSD schema (a huge collection of *.xsd files)
TODO:
- create python classes corresponding to the given schema
- create, serialize/deserialize (to/from XML) python objects of these
classes (according to the given schema)

Thanks! :)
2 Answers

Stefan Behnel

2/29/2008 12:01:00 PM

0

Vladimir Kropylev wrote:
> What is the most actual approach to python XML data-binding?
> The answers given by google seam to be rather outdated. Can't believe
> nothing's changed since 2003.
>
> To be concrete, i've faced the following task:
> I HAVE:
> - XSD schema (a huge collection of *.xsd files)
> TODO:
> - create python classes corresponding to the given schema
> - create, serialize/deserialize (to/from XML) python objects of these
> classes (according to the given schema)

If you don't insist on generating code, lxml.objectify might do what you want.

http://codespeak.net/lxml/obje...
http://codespeak.net/lxml/obje...#asserting-a-schema

Stefan

P Shetty

2/29/2008 1:20:00 PM

0

Vladimir Kropylev wrote:
> Hi,
>
> What is the most actual approach to python XML data-binding?
> The answers given by google seam to be rather outdated. Can't believe
> nothing's changed since 2003.
>
> To be concrete, i've faced the following task:
> I HAVE:
> - XSD schema (a huge collection of *.xsd files)
> TODO:
> - create python classes corresponding to the given schema
> - create, serialize/deserialize (to/from XML) python objects of these
> classes (according to the given schema)
>

http://www.rexx.com/~dkuhlman/gener...