Home | Trees | Indices | Help |
|
---|
|
object --+ | PyXSD
|
|||
|
__init__(self,
xmlFileInput,
xsdFile=None,
xmlFileOutput=False,
transformOutputName=None,
transforms=[],
classFile=None,
verbose=False,
quiet=False) This class is init'ed from the command line normally. |
||
| executeAndWriteTransforms(self, rootInstance) | ||
| getSchemaFile(self) | ||
|
writeParsedXMLFile(self,
rootInstance) Function to write the xml output after it is parsed. |
||
|
parseXSD(self) Reads the given xsd file and creates a set of classes that corespond to the complex and simple type definitions. |
||
|
parseXML(self) Reads the given xml file in the context of the xsd file. |
||
|
generateCorrectSchemaTags(self) Generates the proper schema information and namespace information for a tag. |
||
|
writeXML(self,
rootInstance,
output) Sends a pythonic instance tree to the tree writer. |
||
|
getClasses(self) Returns the dictionary of classes created by ElementRepresentative for each type specified in the schema. |
||
|
loadClassFromFile(self,
classFile) Loads a file with overlay classes into the class dictionary. |
||
|
getXmlTree(self) Sends the xml file into the ElementTree library's parser. |
||
|
getXmlOutputFileName(self) Creates a default name for xml file that is parsed without any transforms. |
||
|
getTransformModuleAndLoad(self,
className) Loads a transform class from its class name. |
||
|
transform(self,
transforms,
root) Calls the transforms specified by the user. |
||
|
getTransformsFileName(self) Creates a default name for xml file that is written after all of the transforms. |
||
|
getSchemaInfo(self,
nameOrLocation) Extracts information from the schemaLocation tag or the noNamespaceSchemaLocation tag. |
||
|
makeFullName(self,
ns,
text) Makes a string that looks similar to some of the names in ElementTree when it contains namespace information. |
||
Inherited from |
|
|||
Inherited from |
|
This class is init'ed from the command line normally. Use this information for uses of pyXSD as a library. Parameters:
|
|
|
Function to write the xml output after it is parsed. Called from the __init__. Parameters: - |
Reads the given xsd file and creates a set of classes that corespond to the complex and simple type definitions. No parameters. |
Reads the given xml file in the context of the xsd file. Produces instances of the above classes. Does validation. returns a a schema instance object. no parameters |
Generates the proper schema information and namespace information for a tag. ElementTree leaves the schema information in a form that is not valid XML on its own. No parameters |
Sends a pythonic instance tree to the tree writer. parameters:
|
Returns the dictionary of classes created by ElementRepresentative for each type specified in the schema. no parameters |
Loads a file with overlay classes into the class dictionary. Overlay classes add to and override the schema type classes to allow for a user to create their own types without changing the schema file itself. Consider this functionality experimental. parameters:
|
Sends the xml file into the ElementTree library's parser. Allows for the program to get the schemaLocation before parsing the xml against the schema. No parameters. |
Creates a default name for xml file that is parsed without any transforms. Uses the name from the inputed xml file. no parameters |
Loads a transform class from its class name. The file that it is located in must be the same as the className, except the first letter in the filename must be lowercase. The transform must be located in a directory called transforms that is in the installation folder of pyXSD, the directory you called the program from, or in the directory where the xml file is. parameters:
|
Calls the transforms specified by the user. Each transform is loaded into memory by getTransformModuleAndLoad(). The transform class is passed the instance of the root element when it is initialized. The transform object is called with the specified arguements and the new root instance is set to whatever the transform returns, which is usually the root, but it is not required. Any user who uses a transform that does not return the root tree instance should be aware that any transform that uses the root instance will fail to work and raise a fatal error. Transforms add a great amount of power to the program, but users might need to tweak their transform calls and any user-written classes in order to get them to work correctly. Further documentation is located in the doc/ directory and on the pyXSD website. These documents can help users write transform classes and calls. Parameters:
|
Creates a default name for xml file that is written after all of the transforms. Uses the name from the inputed xml file. no parameters |
Extracts information from the schemaLocation tag or the noNamespaceSchemaLocation tag.
Depending on the value of parameter parameters:
'l', the location of the schema is returned. If it is 'n', the namespace is returned, if there is one. 't' returns the tag name to indicate if the xml uses schemaLocation or noNamespaceSchemaLocation |
Makes a string that looks similar to some of the names in ElementTree when it contains namespace information. parameters:
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Thu Sep 07 21:19:40 2006 | http://epydoc.sourceforge.net |