Export / Import XML


Exporting the project in XML format

In addition to save a ModelSphere project in a binary format (.sms files), it is also possible to save them in an XML format.

To do so, select the Export to > XML format... item under the File menu.


Importing an XML file

Models exported by the Export in XML feature can be re-imported within ModelSphere.

To do so, select the Import from > XML format... item under the File menu.

It is important to note that only XML files generated by the Export in XML feature can be re-imported within ModelSphere. Trying to import other kinds of XML files will fail.


Pros and Cons of XML compared to the binary format (.sms)

It is possible to keep versions of ModelSphere models in a configuration management tool. Because XML files are text files, it is possible to display differences between two versions with the configuration management tool; it is not possible with the binary format (only ModelSphere is able to read and to display differences between models - see integration ).

SMS (binary format)
XML format
PROS : 
  • generate smaller files
  • was supported in previous versions of ModelSphere
CONS : 
  • cannot be edited with a text editor
  • correction of corrupted files almost impossible
  • cannot be parsed 
PROS:
  • can be edited with a text editor.
  • corrupted files can be corrected
  • can be parsed by an XML parser
CONS:
  • generate larger files
  • only in ModelSphere 2.1 and +



Reading XML files in other programs

Because the .xml format is ModelSphere-specific, it is not possible to import ModelSphere .xml file in other tools not designed to do so. Nevertheless, it is possible to parse .xml files with a standard XML parser, and then write a program to read .xml.