4: Configuration Using XML
EDS Device Servers Command Reference
48
Best Practices
Testing the XML Configuration File
The group name <processmethod> and item name <method> allow the XML
configuration file to be tested for accuracy before processing the file. During testing, the
file is checked for configuration errors, such as an incorrect baud rate entry for a serial
port. When you use <processmethod> and <method>, you can indicate how the EDS
behaves if it finds configuration errors during testing:
If you select the “pair” value, all valid commands are processed and any configuration
errors in the XML file are ignored.
If you select the “group” value, an error found during testing stops the processing and
no commands are executed. This is the default.
Note:
<processmethod> only deals with configuration errors. Any syntax errors in
the XML configuration file that prevent the file from being parsed, such as a
missing angle bracket or delimiter, cause the EDS to reject the entire
configuration file. For security reasons, passwords, private keys, and certificates
are not imported.
Importing and Exporting Partial Configurations
You can import or export an entire XCR, or just a portion of it, by specifying the group
and/or group instances. Import and export operations are performed from the local
filesystem and require a file on the local filesystem.
The following syntaxes can be used to import configurations:
xcr import <file>
xcr import <file> <groups and/or group:instances>
These lines import all groups specified in the XML config record named in
<
file
>
. Any
filename is valid, and the file name and extension are not important. However, the file
name
eds4100.xcr
is not acceptable, since performing a get on that name produces
the current configuration and does not get anything from the filesystem.
In the second example:
Instance follows group with a colon (see the third example on the next page).
Multiple groups are separated with a comma.
Any white space requires the list of groups to be quoted.
The following syntaxes can be used to export configurations:
xcr export <file>
xcr export <file> <groups and/or group:instances>
The same guidelines above regarding importing configurations also apply to exporting
configurations, except only groups are written to the file. If instances are specified after
the groups, only those group instances are written. If no instance is specified, all
instances of that group are written.