Xml schema overview, Header, Object elements – Echelon LonWorks Network XML User Manual

Page 20

Advertising
background image

12

Using the XML Schema

XML Schema Overview

The LonMaker XML plug-in includes an XML schema that defines the structure and content of a
LonMaker network XML file. The XML schema documents the XML file generated and read by the
LonMaker XML plug-in. You can use the XML schema to validate the contents of a LonMaker
network XML file to some extent. For example, the XML schema validates the length and characters
for the string values of object properties; however, it does not validate the numeric and enumerated
values.

The XML schema includes a header that defines the context of the XML data and object elements that
correspond to objects in the LNS network database. The following sections summarize the header and
object elements. All elements in the XML schema have a predefined standard or derived type to
enforce L

ON

W

ORKS

or LNS specific constraints.

The complete XML schema is included as Appendix A. You can also view the XML schema by using
an XML editor to open the LonWorksNetwork.xsd file in the Echelon LonMaker XML Interface
folder. To access this folder, browse to LonMaker\XMLin your L

ON

W

ORKS

directory

(C:\LonWorks by default) or click Start on the taskbar, point to Programs, point to the Echelon
LonMaker
folder, and then click Echelon LonMaker XML Interface.

Header

The header of the XML schema includes the following elements listed in order of sequence:

Name. Specifies the name of the LNS network database from which the XML data was exported.

This field is optional upon import.

ReportCreated. Specifies the data and time in which the exported XML file was created. This

field is ignored upon import.

RootSubsystem. Specifies the context of the subsystems, application devices, and routers in the

XML file. All subsystems in the XML file must be dependents of the root subsystem. On import,
if the root subsystem is empty or not specified, either the subsystem specified in the
SendCommand request or the first top-level subsystem is assumed. You can use absolute or
relative references to this subsystem for object elements in other subsystems such as connection
targets. For absolute references, you use a leading “\” character; for relative references, you use a
$”character.

DomainID. Specifies the domain ID of the network. If specified upon import, the domain ID of

the network will be updated if it differs from the value supplied. The ID is specified as a series of
0, 2, 6, or 12 hex digits.

ExportScope. Specifies the scope of the exported data.
<xs:element name="LonWorksNetwork">

<xs:complexType>

<xs:sequence>

<xs:element name="Name" type="xs:string" minOccurs="0" />

<xs:element name="ReportCreated" type="xs:dateTime" minOccurs="0" />

<xs:element name="RootSubsystem" type="xs:string" minOccurs="0" />

<xs:element name="DomainId" type="xs:string" minOccurs="0" />

<xs:element name="ExportScope" type="enumType" minOccurs="0" />

Object Elements

Object elements are complex XML elements that correspond to objects in the LNS network database.
Object elements include subsystems, application devices, routers, functional blocks, network variables,
channels, and so on. Object elements may include a Name property, Handle attribute, Action
attribute, and various properties. The following sections describe the Name property, Handle
attribute, and Action attribute.

Advertising