MODULAR SIMOBJECT XML PROPERTIES
There is no specific modular SimObject XML file that needs to be included when creating modular objects, however there are some specific element nodes and attributes that can be used in the various SimObject XML files to facilitate the merging of the files when the final package is being built. You can find more information on modular SimObjects and how the XML files are merged from the following pages:
The elements and attributes listed below are used as part of the Manual-Merge process for XML files.
IMPORTANT! For the following nodes to be included in the manual-merge process, they should be in the correct place within the XML architecture.
AutoMerge
(Attribute)
This attribute can only exist in the XML files contained in the Presets folder of a modular aircraft, and must be added only to the root node element. When this attribute is set to 1 (true) then the XML files will use Auto-Merge, and if set to 0 (false) then they will use Manual-Merge. If this attribute is not included, the default behaviour for the XML files is to auto-merge. The schema example below shows how this attribute should be used:
<rootNode AutoMerge="1">
<Element>
DATA
<Sub-Element>
DATA
</sub-Element>
</Element>
</rootNode >
<RemoveEntry />
This self-closing element can be used to remove another element from the final XML architecture. If the element has any contents (values, sub-elements), these too will be removed. The element requires that the root element of the XML file has the AutoMerge
attribute set to 0 (false), and has the following attributes:
Attribute | Description | Type | Required |
---|---|---|---|
Node |
This is the name of the node element that you want to remove. | String | Yes |
[attributes] |
There can be multiple additional attributes, which is used to identify the exact node that is being referenced for removal. Each one should be the exact same as that of the node element that you want to remove (see the example below). | String/Real | No |
<MoveEntry>
This element can be used to move another element within the final XML architecture. If the element has any contents (values, sub-elements), these too will be moved. The way that this works is that you specify a node element as an attribute, then you give the nodes that you want to put it after within the element. For example, if you have this in either the common or attachment file:
<RootElement>
<Element>
<SubElement [attribute]="foo"/>
<SubElement [attribute]="bar"/>
<Element>
<RootElement>
But in the final merged XML you want to have the "foo" element after the "bar" element, then your preset would look like this:
<RootElement AutoMerge="0">
<Element>
<MoveEntry Node="SubElement" [attribute]="foo">
<SubElement [attribute]="bar"/>
<MoveEntry/>
<Element>
<RootElement>
This will give a final merged XML like this:
<RootElement>
<Element>
<SubElement [attribute]="bar"/>
<SubElement [attribute]="foo"/>
<Element>
<RootElement>
The element requires that the root element of the XML file has the AutoMerge
attribute set to 0 (false), and has the following attributes:
Attribute | Description | Type | Required |
---|---|---|---|
Node |
This is the name of the node element that you want to move. | String | Yes |
[attributes] |
There can be multiple additional attributes, which is used to identify the exact node that is being referenced for moving. Each attribute should be the exact same as that of the node element that you want to move (see the example below). | String/Real | No |