generateDS 2.13a Beta

Generate data structures from XML schema

  Add it to your Download Basket!

 Add it to your Watch List!


Rate it!

What's new in generateDS 2.13a Beta:

  • Minor fix to function generateToEtreeChildren. Must generate call to get_valueOf only when defined (i.e. when element is simpleContent or isMixed).
  • Fix to generation of class name prefixes added with the "-p" command line option. This fix was added by Christian Ascheberg. Thank you Christian.
  • Added unit test for class name prefixes command line option.
Read full changelog
send us
an update
MIT License 
620 KB
Dave Kuhlman
Home \ Developer Tools
1 generateDS Screenshot:
generateDS - Usage screen for the application that appears when running it from a Terminal window.
generateDS generates Python data structures (for example, class definitions) from an XML Schema document. These data structures represent the elements in an XML document described by the XML Schema.

generateDS is also able to generate parsers that load an XML document in the data structures.

In addition, a separate file containing subclasses (stubs) is optionally generated. The user can add methods to the subclasses in order to process the contents of an XML document.

The generated Python code contains:
· A class definition for each element defined in the XML Schema document.
· A main and driver function that can be used to test the generated code.
· A parser that will read an XML document which satisfies the XML Schema from which the parser was generated. The parser creates and populates a tree structure of instances of the generated Python classes.
· Methods in each class to export the instance back out to XML (method export) and to export the instance to a literal representing the Python data structure (method exportLiteral).

The generated classes contain the following:
· A constructor method (__init__), with member variable initializers.
· Methods with names 'getX' and 'setX' for each member variable 'X' or, if the member variable is defined with maxOccurs="unbounded", methods with names 'getX', 'setX', 'addX', and 'insertX'.
· A "build" method that can be used to populate an instance of the class from a node in a minidom tree.
· An "export" method that will write the instance (and any nested sub-instances) to a file object as XML text.
· An "exportLiteral" method that will write the instance (and any nested sub-instances) to a file object as Python literals (text).

Last updated on September 12th, 2014

Runs on: Mac OS X (-)


#data structure generator #generate data structure #generate parser #generate #generator #data sctructure #parser

Add your review!