The nillable attribute can be defined on an xsd:element within an XML schema. It specifies that the xsi:nil attribute is valid for the element. If an XML schema has defined the nillable attribute as true, it is mapped as a required attribute and is included in the document, however, its values are nullified. Depending on the circumstances, the XML conversion process behaves differently when nillable elements are mapped.
COPY:
01 STRUCT-1.
05 ATTR-1 PIC X(5).
05 ELE-1 PIC X(10).
XSD:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:p1="http://www.example.com"
targetNamespace="http://www.example.com"
elementFormDefault="unqualified"
attributeFormDefault="unqualified">
<xs:element name="ele1_detail">
<xs:complexType>
<xs:sequence>
<xs:element name="ele_1" type="p1:ele_1" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ele_1">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="attr-1">
<xs:simpleType>
<xs:restriction base="xs:string">
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>