Module XMLAutomata :: Class CXMLAutomata
[hide private]
[frames] | no frames]

Class CXMLAutomata
source code

This Class manages the reading and the writing of XML automata files in Supremica format.

Nested Classes [hide private]
__CXMLAutomataLogger This Class has methods to write to an XML file the providen automata in the Supremica format.
__CXMLAutomataParser This Class has methods to parse an XML file writing its content in the providen automata struct.
__CXMLAutomataStruct A structure to store the information present in a XML Supremica Automata file.

Instance Methods [hide private]
  __file2Struct(self, file)
This method permits to read a given XML file and to write it in the form of a CXMLAutomata.__CXMLAutomataStruct class.
  __struct2File(self, xmlstruct, filename)
This method permits to read a given automata struct and to write it on a given XML file.
  __struct2Automata(self, xmlstruct)
This method permits to read a given automata struct and to write it on a automata class.
  __automata2Struct(self, automata)
This method permits to read a given automata class and to write it on a automata struct.
  file2Automata(self, file)
This method permits to parse a given XML automata file and to write its content on a automata class.
  automata2File(self, automata, filename)
This method permits to read a given automata class and to write its content on a XML Supremica automata file.

Imports: saxutils

Method Details [hide private]

__file2Struct(self, file)

source code 
This method permits to read a given XML file and to write it in the form of a CXMLAutomata.__CXMLAutomataStruct class.
Parameters:
  • file (string) - the XML file to read
Returns:
a CXMLAutomata.__CXMLAutomataStruct instance

__struct2File(self, xmlstruct, filename)

source code 
This method permits to read a given automata struct and to write it on a given XML file.
Parameters:
Returns:
void

__struct2Automata(self, xmlstruct)

source code 
This method permits to read a given automata struct and to write it on a automata class.
Parameters:
Returns:
a Automata.CAutomata instance

__automata2Struct(self, automata)

source code 
This method permits to read a given automata class and to write it on a automata struct.
Parameters:
Returns:
a CXMLAutomata.__CXMLAutomataStruct instance

file2Automata(self, file)

source code 
This method permits to parse a given XML automata file and to write its content on a automata class.
Parameters:
  • file (string) - the XML file to parse the automata
Returns:
a Automata.CAutomata instance

automata2File(self, automata, filename)

source code 
This method permits to read a given automata class and to write its content on a XML Supremica automata file.
Parameters:
  • filename (string) - the XML file where to write the automata class
  • xmlstruct (a Automata.CAutomata instance) - the automata class to read
Returns:
void