PyXB ("pixbee") is a pure Python package that generates Python source code for classes that correspond to data structures defined by XMLSchema. The generated classes support bi-directional conversion between XML documents and Python instances. In concept it is similar to JAXB for Java and CodeSynthesis XSD for C++.

Version 0.4.0, available from https://sourceforge.net/projects/pyxb, is fairly complete, and supports the following features:

   * Simple and complex type definitions
   * List and union datatypes
   * Constraints on (simple) datatypes (e.g., minInclusive, length)
   * Model groups and attribute groups
* Complex content models (all, sequence, choice); minOccurs and maxOccurs
   * Abstract types, xsi:type, substitution groups
   * Nillable elements with xsi:nil
   * Namespace qualified attributes and elements
   * Class constants corresponding to string enumeration constraints

It successfully generates bindings for many of the major WS-I schemas, such as WSDL and SOAP, as well as others like KML and SAML. A variety of examples show how to use it with demonstration web services such as the National Digital Forecast Database. The generated code can easily be customized by subclassing the generated bindings. Both DOM and SAX-based parsing are supported.

PyXB assumes a fairly strict interpretation of the XML Schema specification, so web services using SOAP encodings with schemas but being lax about namespaces and validation against content models can sometimes be difficult to use. This may be addressed in a future release.

The documentation serves as the project's home page, and can be viewed at http://pyxb.sourceforge.net/.

This is the initial public release, and I would appreciate any feedback.

Peter


_______________________________________________
XML-SIG maillist  -  XML-SIG@python.org
http://mail.python.org/mailman/listinfo/xml-sig

Reply via email to