Lantronix LX6 manual Importing and Exporting an XML Configuration File, Best Practices

Page 18

4: Configuration Using XML

<configgroup name="cp group" instance="Line1_Modem_Ctl_In"> <configitem name="cp" instance="3">

<value name="bit">0</value> <value name="type">input</value> <value name="assert low">enable</value>

</configitem>

<configitem name="state"> <value>disable</value>

</configitem>

</configgroup>

Importing and Exporting an XML Configuration File

An XCR can be imported or exported using the following methods:

Filesystem-XCRs can be saved to the device server file system and imported or accessed as needed. See Best Practices on page 18 or the Filesystem Browser section in the XPort Pro Lx6 Embedded Device Server User Guide.

CLI-XCRs can be imported (captured) or exported (dumped) directly to a Telnet or serial line CLI session. Capturing an XCR can be started by pasting a valid XCR directly into the CLI prompt. The XPort Pro Lx6 embedded device server immediately processes the configuration record, changing any settings specified. This can be done on any level, including the root. Special tags in the XML allow for providing root and enable level passwords so that this can also be done at the password prompt.

Web browser-Web Manager can be used to import and export an XCR to the device server file system. It can also be used to import an XCR from an external source such as your local hard drive.

FTP-The device server FTP server can export and import XCRs when an FTP get or put command for the filename (xport_pro_lx6.xcr for export, xport_pro_lx6_import.xcr for import; both are under the pwxcr directory) is requested. On export (FTP get of xport_pro_lx6.xcr), the FTP server obtains the current XCR from the XPort Pro Lx6 and sends it as a file. On import (FTP put of xport_pro_lx6_import.xcr), the FTP server processes the file by sending it directly to the XML engine. In both cases the device server filesystem is not accessed. The files xport_pro_lx6.xcr and xport_pro_lx6_import.xcr are not read from or written to the file system. See FTP in the XPort Pro Lx6 Embedded Device Server User Guide.

Best Practices

You can import or export an entire XCR, or just a portion of it, by specifying the group name and/or group instances. In the examples below, import and export operations are performed from the CLI on the local filesystem and require a XCR on the local filesystem. The Web Manager provides the same functionality.

Caution: Using Microsoft Word to edit and save an XCR will change the format of the file and make it incompatible with XPort Pro Lx6 embedded device server. This is true even if the file is saved as Plain Text (.txt) or an XML Document (.xml). Notepad, a third party text editor, or a specialized XML editor should be used instead.

XPort® Pro Lx6 Embedded Device Server Command Reference

18

Image 18
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 HierarchyUsing 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 addressConfigure config level commands Connect tunnel-connect1 level commandsIf instance Host instance Cp email-cp4 level commands Cp email-cp3 level commandsCp email-cp2 level commands Cp email-cp1 level commandsCp output tunnel-connect-cpoutput1 level commands Add cp to group Cp output tunnel-accept-cpoutput1 level commandsCpm cpm level commands Add cp to group bitDevice device level commands Diagnostics config-diagnostics level commandsDisconnect tunnel-disconnect1 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 Filesystem filesystem level commands Ftp config-ftp level commandsHost 1 tunnel-connect-host11 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/prefixlengthIp config-ip level commands Line 1 line1 level commandsBaud rate bits per second Gap timer milliseconds Name textLink config-etherneteth0 level commands Log config-diagnostics-log level commands Modem tunnel-modem1 level commandsPacking tunnel-packing1 level commands Root level commands Serial tunnel-serial1 level commandsSmtp config-smtp level commands Syslog config-syslog level commands Telnet config-cli-telnet level commandsHost text 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 listXcr import file group list Xsr dump group listXsr export file group list
Related manuals
Manual 74 pages 16.36 Kb