Drucegrove DragonFly User Manual 1.4
Page 20
The following is an example of an XML file, which has been colour coded to highlight different elements:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Comment -->
<Root>
<SettingGroup>
<Setting>
Value
</Setting>
</SettingGroup>
<ElementGroup>
<Element>
<!-- Comment -->
<Setting>
Value
</Setting>
</Element>
<Element
AttributeName="AttributeValue"
>
<Setting>
Value
</Setting>
<Setting>
Value
</Setting>
</Element>
</ElementGroup>
</Root>
The first line (shown in orange) should always be present; it defines the XML version and encoding, and the
DragonFly software will not load the XML file without this.
Comments (shown in green) can be added to an XML file between
<!--
and
-->
tags.
The XML structure consists of nodes (shown in black) and settings (shown in blue). The names of these nodes and
settings vary depending on the type of XML file (ie, the nodes and settings in the Settings.xml file are different to a
layout XML file).
All nodes and settings must have a matching closing tag, which is the same as the opening tag but with a forward
slash after the < character. If a closing tag is not present or misspelled, the DragonFly software will fail to load the
XML file.
Some elements and settings may have attribute settings (shown in red). The attribute name is followed by an equals
character, and then the attribute value is placed inside quotation mark characters. Multiple attributes can be defined
if necessary, separated by a space. Attributes do not require a closing tag.