Package pyxsd :: Module pyXSD
[hide private]
[frames] | no frames]

Module pyXSD

source code

PyXSD was developed in order to map XML and the related schema (XSD) files into the programming language Python. The program builds a Pythonic representation of the XML tree according to the specifications in the schema and raises non-fatal parser errors whenever possible in order to help the user validate their XML document. The program allows the user to specify transform classes, which manipulate and transform the XML tree in various ways. The program then writes the tree back out into XML. This program was written in order to replace many of the old tools that were written in FORTRAN with the more modern XML format and the more modern and powerful Python programming language. PyXSD allows users to create their own transform classes with the help of a transform library. These classes are fairly simple to write, making the system highly adaptable to very specific uses, as one might find in many scientific applications; however, the program has potential uses in other fields, since XML is widely used. The program allows the user to specify the desired transform classes, along with their arguments and sequence of application, so the user can create customised tools. The program can be used either as a standalone command line program or as a library in other programs.

For more information on pyXSD, see the pyXSD website if you haven't already.

Overview:

Features:



Classes [hide private]
  PyXSD
main class of the program that is in charge of data flow.

Functions [hide private]
  main()
This function is called when pyXSD is being called from the command line.

Variables [hide private]
  __module__ = 'pyXSD'
  __version__ = '0.1'
  __author__ = 'Karl Norby and Mike Summers'

Imports: sets, sys, traceback, imp, urllib, os, xml.etree.cElementTree, xml.etree.ElementTree, xml.etree.as, elementtree.ElementTree, elementRepresentatives.elementRepresentative.ElementRepresentative, writers.xmlTreeWriter.XmlTreeWriter, schemaBase.SchemaBase, optparse.OptionParser


Function Details [hide private]

main()

source code 

This function is called when pyXSD is being called from the command line. It runs the OptionParser found under optparse in the standard library. Some checks are performed on the data collected, and if these checks pass, it initializes the pyXSD class.

No parameters


Variables Details [hide private]

__module__

None
Value:
'pyXSD'                                                                
      

__version__

None
Value:
'0.1'                                                                  
      

__author__

None
Value:
'Karl Norby and Mike Summers'