Workbench User Guide : 16. Managing and Deploying Applications : How You Can Import and Export Applications and Components : XML Import and Export
 
Share this page                  
XML Import and Export
OpenROAD applications and source components can be exported to and imported from XML. This file format is human readable, produces clean differences between different revisions of a file, allows changes to be merged, and enables OpenROAD source components to be managed by a variety of SCM systems.
Applications can be exported from OpenROAD with or without components. (Exporting without components is useful for creating empty applications before importing components.) Files can be imported and exported with or without XML metadata (AlterBy, AlterDate, Creator, CreateDate).
For more information, see the AppSource class, ExportApp and ImportComp methods; and the CompSource class, ExportComp method in the Language Reference Guide. Also see the System Reference Summary.
Effect on File Size of Including Default Attribute Values and Indenting XML Elements
Files exported to XML will be about 25 percent larger than files exported in OpenROAD format.
If you include the default values of attributes in the export (by setting II_W4GL_EXPORT_WITH_DEFAULTS=TRUE), export file size is further increased, and export performance is decreased. Import processing will take longer because all of the attributes must be applied instead of only those having non-default values. File size and performance depend on the number and kind of objects included.
If hierarchical element indentation is also included in XML output (II_W4GL_EXPORT_INDENTED=TRUE), file size will increase another 50 percent. To reduce file size on export, either or both default values and XML element indentation can be excluded.
For more information, see Environment Variables for All Platforms. See also the XMLDocument class, WriteStartDocument and WriteToFile methods in the Language Reference Guide.
Export Encoding
To solve character set problems, XML files can be exported in UTF-8 format. Invalid XML characters in the application or component sources such as formfeeds are handled by an XML processing instruction with the target "ingres_invalidxmlchar."
For more information, see the XMLDocument class, WriteToFile method in the Language Reference Guide.
XML Schema Definition
The XML schema is provided in the following file:
%II_SYSTEM%\ingres\files\openroad.xsd
To validate XML export files against the schema during importing, you can specify the location of the XSD in the II_W4GL_IMPORT_XSD environment variable (see Environment Variables for All Platforms).
More Information
For more information about XML system classes and constants, see the Language Reference Guide and the System Reference Summary. For programming considerations and examples, see the Programming Guide.