Gets or sets a value that indicates whether the System.Xml.Serialization.XmlSerializer must serialize a member that is set to null into the xsi:nil attribute set to true.
Documentation for this section has not yet been entered.
The XML schema specification for structures allows an XML document to explicitly signal that an element's content is missing. Such an element contains the attribute xsi:nil set to true. For more information, see the http://www.w3.org/TR/xmlschema-1/ specification named XML Schema Part 1: Structures.
If the XmlRootAttribute.IsNullable property is set to true, the xsi:nil attribute is generated as shown in the following XML:
Example
<?xml version="1.0" encoding="utf-8"?> <Group xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:nil="true" />
If the XmlRootAttribute.IsNullable property is false, an empty element is created as shown in the following code:
Example
<?xml version="1.0" encoding="utf-8"?> <Group xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />