4: Configuration Using XML
EDS Device Servers Command Reference
45
Each configuration group must have one or more <configitem> element. The
configuration item is a specific group of configurable parameters relevant to the parent
group. It accepts the “name” attribute.
A <configitem> must have at least one <value>. This element specifies the actual value
of the configuration parameter. It accepts the “name” attribute.
Note:
In general, an empty <value> clears the value to its default setting.
Exceptions are passwords and SSH/SSL certificates.
A <value> element contains the configuration value that gets parsed by the EDS and may
take a “name” attribute.
Attributes
Use the “name” attribute to identify a group, item, or value. It is always a quoted
string.
Use the “instance” attribute to identify the specific option (such as the serial port
number). It is always a quoted string.
Quick Syntax Tour for XCRs
Figure 4-1 shows a simple XML example.
Figure 4-1. Simple XML Group Example
<?xml version=”1.0” standalone=”yes”?>
<configrecord>
<configgroup name = “serial command mode” instance = “1”>
<configitem name = “mode serial string”>
<value>disable</value>
</configitem>
</configgroup>
</configrecord>
The first line:
<?xml version=”1.0” standalone=”yes”?>
is the “XML declaration.” It is required and indicates the XML version in use (normally
version 1.0).
The remainder of the document consists of nested “elements,” some of which have
“attributes” and “content.”
An element typically consists of two tags, a “start tag” and an “end tag,” possibly
surrounding text and other elements.
−
The start tag consists of a name surrounded by angle brackets, like
<configrecord>
.
−
The end tag consists of the same name surrounded by angle brackets, but
with a forward slash preceding the name, like
</configrecord>
.