Lantronix LX6 manual Configuration Using XML, XML Configuration Record Document Type Definition

Page 14

4:Configuration Using XML

The device server provides an Extensible Markup Language (XML) interface that you can use to configure device server devices. Every configuration setting that can be issued from the device server Web Manager and CLI can be specified using XML.

The device server can import and export configuration settings as an XML document known as an XML Configuration Record (XCR). An XCR can be imported or exported via the CLI, a Web browser, FTP, or the device server filesystem. An XCR can contain many configuration settings or just a few. For example, it might change all of the configurable parameters for a device server, or it may only change the baud rate for a single serial line. Using XCRs is a straightforward and flexible way to manage the configuration of multiple device server devices.

XML Configuration Record Document Type Definition

An XML document type definition (DTD) is a description of the structure and content of an XML document. It verifies that a document is valid. XCRs are exported using the DTD as shown in Figure 4-1 DTD for XCRs.

Figure 4-1 DTD for XCRs

<!DOCTYPE configrecord [

<!ELEMENT configrecord (configgroup+)>

<!ELEMENT configgroup (configitem+,configgroup*)> <!ELEMENT configitem (value+)>

<!ELEMENT value (#PCDATA)>

<!ATTLIST configrecord version CDATA #IMPLIED> <!ATTLIST configgroup name CDATA #IMPLIED> <!ATTLIST configgroup instance CDATA #IMPLIED> <!ATTLIST configitem name CDATA #IMPLIED> <!ATTLIST value name CDATA #IMPLIED>

]>

The device server DTD rules state the following:

The XML document element is a <configrecord> element. This is the root element.

A <configrecord> must have one or more <configgroup> elements and can have a version attribute.

A <configgroup> must have one or more <configitem> elements and can have name and instance attributes.

A <configitem> element must have one or more <value> elements and can have a name attribute.

A <value> element can have only data and can have a name attribute.

The name attribute identifies a group, item, or value. It is always a quoted string.

The instance attribute identifies the specific option, like the serial port number. The "instance" attribute is always a quoted string.

XPort® Pro Lx6 Embedded Device Server Command Reference

14

Image 14
Contents Embedded Device Server Command Reference Copyright and Trademark Table of Contents List of Figures List of Tables Chapter Summaries ConventionsDeviceInstaller Online Help Additional DocumentationOverview XML Architecture and Device ControlConfiguration Using Telnet Configuration Using the Serial PortCommand Line Interface Navigating the CLI Hierarchy Using Keyboard Shortcuts and CLI Understanding the CLI Level HierarchyCLI Level Hierarchy Enable Level Commands Configuration Using XML XML Configuration Record Document Type DefinitionQuick Tour of XML Syntax DeclarationRecord, Group, Item, and Value Tags XML Example of Multiple Named ValuesXML Example of Multiple Items Importing and Exporting an XML Configuration File Best PracticesImporting XML Configuration Groups XCR GroupsConfiguration Using XML Icmp Configuration Using XML Configuration Using XML Configuration Using XML Configuration Using XML URI XML Status Record Groups and Items XSR Group and ItemsConfiguration Using XML Configuration Using XML LISTEN, Synrecvd Configuration Using XML Status Configuration Using XML Group Name Item Name Configuration Using XML Configuration Using XML Commands and Levels Commands and Levels Accept tunnel-accept1 level commandsFlushes the serial data buffer upon establishing an accept Add IP address MAC address Arp config-arp level commandsCli config-cli level commands Remove ip IP addressIf instance Configure config level commandsConnect tunnel-connect1 level commands Host instance Cp email-cp4 level commands Cp email-cp3 level commandsCp output tunnel-connect-cpoutput1 level commands Cp email-cp2 level commandsCp email-cp1 level commands Add cp to group Cp output tunnel-accept-cpoutput1 level commandsCpm cpm level commands Add cp to group bitDisconnect tunnel-disconnect1 level commands Device device level commandsDiagnostics config-diagnostics level commands Dns dns level commands Timeout millisecondsDiscovery config-discovery level commands Lookup hostoripEmail number Email 1 email1 level commandsCc text From textEmail 2 email2 level commands To textEmail 3 email3 level commands Email 4 email4 level commands Commands and Levels Enable enable level commands Host 1 tunnel-connect-host11 level commands Filesystem filesystem level commandsFtp config-ftp level commands Port number Host 10 tunnel-connect-host110 level commands Host 11 tunnel-connect-host111 level commands Host 12 tunnel-connect-host112 level commands Host 13 tunnel-connect-host113 level commands Host 14 tunnel-connect-host114 level commands Host 15 tunnel-connect-host115 level commands Tunneling Show Shows the current configuration Show history Host 16 tunnel-connect-host116 level commands Host 2 tunnel-connect-host12 level commands Host 3 tunnel-connect-host13 level commands Host 4 tunnel-connect-host14 level commands Host 5 tunnel-connect-host15 level commands Host 6 tunnel-connect-host16 level commands Commands and Levels Host 7 tunnel-connect-host17 level commands Host 8 tunnel-connect-host18 level commands Host 9 tunnel-connect-host19 level commands Http config-http level commands Icmp config-icmp level commands Ip address ip address/cidr Icmpv6 config-icmpv6 level commandsIf 1 config-ifeth0 level commands Ipv6 address ip address/prefixlengthBaud rate bits per second Ip config-ip level commandsLine 1 line1 level commands Gap timer milliseconds Name textLink config-etherneteth0 level commands Log config-diagnostics-log level commands Modem tunnel-modem1 level commandsPacking tunnel-packing1 level commands Smtp config-smtp level commands Root level commandsSerial tunnel-serial1 level commands Host text Syslog config-syslog level commandsTelnet config-cli-telnet level commands Terminal 1 config-terminal1 level commands Terminal network config-terminalnetwork level commands Secret xcr export file group list Tunnel 1 tunnel1 level commandsXml xml level commands Xcr dump group listXsr export file group list Xcr import file group listXsr dump group list
Related manuals
Manual 74 pages 16.36 Kb