System.Xml.Serialization.XmlArrayAttribute.Form Property

Gets or sets a value that indicates whether the XML element name generated by the System.Xml.Serialization.XmlSerializer is qualified or unqualified.

Syntax

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

Value

Documentation for this section has not yet been entered.

Remarks

The XmlArrayAttribute.Form property determines whether an XML element name is qualified or unqualified. The XmlArrayAttribute.Form property conforms to the 1999 World Wide Web Consortium (www.w3.org) document titled "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 setting, XmlSchemaForm.None, instructs the System.Xml.Serialization.XmlSerializer to check the schema for the XML document to determine whether the namespace is qualified. If the schema does not specify a value for an individual element or attribute, the System.Xml.Serialization.XmlSerializer uses the elementFormDefault and attributeFormDefault values to determine whether an element or attribute is qualified. The following XML code shows a schema:

Example

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

When the System.Xml.Serialization.XmlSerializer reads the schema, the XmlAttributeAttribute.Form value for both the Name and Number is XmlSchemaForm.None, but the Name element is qualified, while the Number element is unqualified.

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