Structures are encoded as a xs:complexType with all of the fields appearing in a sequence. All fields are encoded as an xs:element. All elements have minOccurs set 0 to allow for compact XML representations. If an element is missing the DefaultValue for the field type is used. If the field type is a structure the DefaultValue is an instance of the structure with DefaultValues for each contained field.

The xs:name attribute restricts the set of characters that are permitted. If a DataType name or its field names uses characters that are not permitted then the DataTypeDefinition (see F.12) or DataTypeField (seeF.13) shall specify a SymbolicName that can be used in a xs:name.

Types which have a NULL value defined shall have the nillable="true" flag set.

For example, the Read service has a ReadValueId structure in the request. The XML schema would look like:

<xs:complexType name="ReadValueId">

<xs:sequence>

<xs:element name="NodeId" type="tns:NodeId"

minOccurs="0" nillable="true" />

<xs:element name="AttributeId" type="xs:int" minOccurs="0" />

<xs:element name="IndexRange" type="xs:string"

minOccurs="0" nillable="true" />

<xs:element name="DataEncoding" type="tns:NodeId"

minOccurs="0" nillable="true" />

</xs:sequence>

</xs:complexType>