System.Xml.Serialization.XmlArrayItemAttribute.Form Property

Gets or sets a value that indicates whether the name of the generated XML element is qualified.

Syntax

public System.Xml.Schema.XmlSchemaForm Form { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The XmlAttributeAttribute.Form property determines whether an XML element name is qualified, based on the World Wide Web Consortium (www.w3.org) specification "Namespaces in XML."

If the XmlAttributeAttribute.Namespace property is set to any value, attempting to set the XmlElementAttribute.Form property to XmlSchemaForm.Unqualified throws an exception.

The default value, XmlSchemaForm.None, instructs the System.Xml.Serialization.XmlSerializer to check the schema for the XML document to determine whether the namespace is qualified. For elements, the System.Xml.Serialization.XmlSerializer checks the value of the schema-element attribute elementFormDefault. For attributes, it checks the value of the schema-element attribute attributeFormDefault. For example, the following XML Schema indicates that the Name element is qualified, while the Number element is unqualified.

Example

 <schema elementFormDefault="qualified" 
 attributeFormDefault="unqualified">
    <element name="Name"/>
    <attribute name="Number"/>
 </schema>

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0