Oatc.OpenMI.Sdk.DevelopmentSupport
MetaInfo used by XmlFile


This list explains how MetaInfo is used by XmlFile

tag: ObjectAggregate
queried for: each class type encountered during reading and writing
expected type: string
default value: DefaultAggregate
meaning: Specifies the class type of an aggregate. For each object identified by an xml element an aggregate is instantiated. The aggregate serves as an "in between" object between the object and XmlFile. NOTE: XmlFile expects that the aggregate has a constructor with one argument, the underlying object.

tag: XmlFile
queried for: each class type encountered during writing
expected type: bool
default value: false
meaning: Indicates whether an object of the specified type should be written as a separate XML file. An XML file and file name can be generated if not known to the XmlFile object. A relative path to this XML file is written in the parent XML file. On reading, if a reference is encountered to such an XML file, this referred file is read immediately.

tag: XmlSchema
queried for: the class type encountered at the top of an xml file during reading
expected type: string
default value: null
meaning: The name of the xsd file against which xml validation is performed. When this value is null, no xml validation is performed.

tag: XmlNameSpace
queried for: the class type encountered at the top of an xml file during writing
expected type: string
default value: null
meaning: The xml namespace. When validation is performed against a schema (xsd file), the xml file must have an xml namespace. For correct validation the xml namespace must be the same as the one specified in the xsd file.

tag: XsdPackage
queried for: the class type encountered at the top of an xml file during reading
expected type: string
default value: null
meaning: Indicates the assembly which contains the xsd file (denoted with XmlSchema).

tag:XmlSkipElement
queried for: each property in an object during writing
expected type: bool
default value: false
meaning: Indicates whether a property should be skipped when written to XML. Also assemblies can be skipped. In that case one must make sure that the assembly has been loaded in another way when reading the xml file.

tag: XmlKey
queried for: each property in an object during writing
expected type: bool
default value: false
meaning: Indicates whether a property should be written to XML if the corresponding object has been written to the XML file before. This occurs when the data structure isn't hierarchical. Only the first time it is encountered on writing, it is written out completely. Next times only a reference is written to the first occurrence. The key of the object is used as reference.
The key of the entire object is the combination of all properties denoted as XML key. This key should be unique per class type per XML file.

tag: XmlAllowGeneration
queried for: each property in an object during writing, which is denoted as an xml key.
expected type: bool
default value: true
meaning: Indicates whether generation of a key value is allowed if the property value is empty (i.e. null or a string of length zero or a string only containing spaces). If generation is to be carried out, a unique number is assigned to the property value. The property type is expected to be an integer or a string.

tag: XmlName
queried for: each property in an object during writing and reading
expected type: string
default value: the property name as defined in the class
meaning: Provides the name for the XML element or XML attribute in the XML file for a property.

tag: XmlRefName
queried for: each property in an object during writing and reading, if the object is or will be written as a reference to a prior object in the XML file.
expected type: string
default value: the XML name
meaning: Provides the name for the XML element or XML attribute in the XML file for a property.

tag: XmlItemName
queried for: each member of a collection during writing
expected type: string
default value: the single name derived from the XML name of the collection object, e.g. the single name of the collection name "nodes", "node list", "node set" or "node collection" will be "node".
meaning: Provides the name for the xml element in the xml file for a collection member.

tag: XmlRefItemName
queried for: each member of a collection during writing, if the member will be written as a reference to a prior object in the XML file.
expected type: string
default value: the single name derived from the XML name of the collection.
meaning: Provides the name for the XML element in the XML file for a collection member.

tag: XmlItemType
queried for: each collection property in an object during reading and writing
expected type: string
default value: null
meaning: Defines the class type of  collection members. If set, class type information can be omitted during writing.

tag: XmlTypeAlias
queried for: each type definition encountered in the XML file during reading
expected type: string
default value: the same type definition.
meaning: Defines the class name (including namespaces) to be instantiated for a type definition in the XML file. This is useful if a class has been renamed and XML files still contain the old class name.

tag: XmlTypeName
queried for: each type definition encountered in the XML file during writing
expected type: string
default value: the same type definition.
meaning: Defines the way the class name is written in xml for the type attribute. This is useful if a readable class name is desired in the xml file. When setting a value for XmlTypeName, a corresponding value for XmlTypeAlias is needed.

tag:XmlParent
queried for: each property in an object during writing
expected type: object
default value: null
meaning: Defines the property of an object, which functions as its parent, i.e. the xml parent element in the xml file. For example, the IElementSet has “Parent” for this value. When the aggregate of the element set is asked for the property “Parent”, it searches for the linkable component which owns the element set.
If the value is null, XmlFile assumes that the object which has this object as a property is the parent.

tag: XmlIndex
queried for: each property in an object during writing
expected type: integer
default value: 1000
meaning: Defines a sorting number of the XML element. During write, XML child elements are sorted according to this sorting number, if equal alphabetically.