XML file structure

The structure of XML file is following:

Note: The information on data encoding and CVS tags is not required.

Data encoding


The information on encoding must be placed just once and at the beginning of XML file. No empty signs are allowed.

Data encoding in XML file:

  • windows-1250
    • if the XML file contains the information on encoding in the the form <?xml version="1.0" encoding="windows-1250"?>
    • or it does not contain the information on encoding and BOM for utf-8 is not at the beginning of file
  • utf-8
    • if the XML file contains the information on encoding in the form <?xml version="1.0" encoding="utf-8"?>
    • or it does not contain the information on encoding and BOM for utf-8 is at the beginning of file

Note: BOM (Byte Order Mark) for utf-8 is a sequence of characters (hexadecimal) EF, BB, BF placed at the beginning of the file. These signs are invisible when the text is displayed.

Warning: If a user rewrites manually the type of encoding in a header of XML file, although the contents of file has been encoded differently, there may occur some problems with a reading of signs with diacritic!

CVS tags


After the object was exported into the XML file, the CVS tags:

  • do not occur in data if the object was exported by the lower version of D2000 System than V7.02.011.
  • occur without values if the object with undefined values of CVS attributes was exported.
  • occur with values if the object with defined values of CVS attributes was exported.

Example:
CVS tag without values:
<!--$Date $ $Revision $ $Author $ $ExpSubDir $-->
CVS tag with values: <!--$Date: 2009/10/07 14:19:07 $ $Revision: 1.2 $ $Author: jstafen $ $ExpSubDir: Common\Planner $-->

The values of CVS tags represents the CVS information about:

  • the version of object - the value of CVS Revision tag
  • the date of version - the value of CVS Date tag
  • the author of version - the value of CVS Author tag

If the CVS tags are not in XML file, they can be inserted manually but only without values!
Any other manual interventions in CVS tags are not permitted and they may break the functionality of XML Repository.

The last tag ExpSubDir is not a CVS tag. This tag contains the parameter "export subdirectory" of the specific object. The value of this tag fills explicitly XML Export.

A usage of the CVS tags is described in XML Repository.

XML data structure


Data of XML file are enclosed in <ROOT> element, for which holds the following:

  • the element must exist in the file only once (it is required)
  • if it is omitted the data are invalid
  • all the other elements are nested in it

The first level of nesting consists of the reserved sections for which holds the following:

Types of reserved sections:

  • reserved sections REFERENCES, CFGRECORDS and OBJLIFELOGS containing the nested structures with values of attributes
  • reserved sections MEMBEROFLOGGROUP and MEMBEROFRESGROUP containing the values placed in the helpful member elements
  • reserved section CRC containing the CRC value

The contents of the sections is mentioned in XML data specification.

XML file may contain also the sections defined by user. Their order and nesting is optional. But their name must be different from the reserved sections.
The optional sections are not processed. Their importance is in extra control of the other functions for users or programmers.

If an unknown element, that can not be placed in reserved section or in any nested structure of this section, is identified when the reserved sections are processing, the warning will occur. The reserved sections may contain only the simple unknown elements, i.e. the unknown element need not contain the nested elements.

Napíšte komentár