System.Xml [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 To be added System.Attribute System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue | System.AttributeTargets.All)

The belongs to a family of attributes that controls how the serializes or deserializes an object. For a complete list of similar attributes, see Attributes That Control XML Serialization.

You can apply the to a public field or read/write property that returns an array of objects. You can also apply it to collections and fields that return an or any field that returns an object that implements the interface.

When you apply the to a class member, the method of the class generates a nested sequence of XML elements from that member. An XML schema document (an .xsd file), indicates such an array as a complexType. For example, if the class to be serialized represents a purchase order, you can generate an array of purchased items by applying the to a public field that returns an array of objects that represent order items.

If no attributes are applied to a public field or property that returns an array of complex or primitive type objects, the generates a nested sequence of XML elements by default. To more precisely control what XML elements are generated, apply an and an to the field or property. For example, by default, the name of the generated XML element is derived from the member identifier You can change the name of the generated XML element by setting the property.

If you serialize an array that contains items of a specific type and all the classes derived from that type, you must use the to declare each of the types.

You can use XmlArray in your code instead of the longer .

For more information about using attributes, see Extending Metadata Using Attributes.

Specifies that the must serialize a particular class member as an array of XML elements.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  For more information about using attributes, see Extending Metadata Using Attributes.

  Initializes a new instance of the class.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  For more information about using attributes, see Extending Metadata Using Attributes.

  Initializes a new instance of the class and specifies the XML element name generated in the XML document instance.

  The name of the XML element that the generates.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String To be added: an object of type 'string'

  Specify an when you want the generated XML element name to differ from the member's identifier.

  You can set the same value to more than one member as long as the generated XML document uses XML namespaces to distinguish between the identically named members. For more details about using namespaces and creating prefixed names in the XML document, see .

  Gets or sets the XML element name given to the serialized array.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Xml.Schema.XmlSchemaForm To be added: an object of type 'System.Xml.Schema.XmlSchemaForm'

  The property determines whether an XML element name is qualified or unqualified. The property conforms to the 1999 World Wide Web Consortium (www.w3.org) document titled "Namespaces in XML."

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

  The default setting, XmlSchemaForm.None, instructs the 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 uses the elementFormDefault and attributeFormDefault values to determine whether an element or attribute is qualified. The following XML code shows a schema:

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

  When the reads the schema, the value for both the Name and Number is XmlSchemaForm.None, but the Name element is qualified, while the Number element is unqualified.

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

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean To be added: an object of type 'bool'

  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 World Wide Web Consortium (www.w3.org) specification titled "XML Schema Part 1: Structures."

  If the property is set to true, the xsi:nil attribute is generated for class members that have been set to null. For example, if you set a field named MyStringArray to null, the generates the following XML code.

  `<MyStringArray xsi:nil = "true" />`

  If the property is false, no XML element is generated.

  You cannot apply the property to a member typed as a value type because a value type cannot contain null.

  Gets or sets a value that indicates whether the must serialize a member as an empty XML tag with the xsi:nil attribute set to true.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String To be added: an object of type 'string'

  The property allows you to create qualified XML element names. The property conforms to the rules for creating an XML namespace as found in the 1999 World Wide Web Consortium (www.w3.org) document titled "Namespaces in XML."

  To create namespaces that are associated with a prefix, you must create an instance of the class that contains the namespaces and prefixes used in the XML document. As you set the namespace for each , it must match one of the namespaces in the . When the XML is generated, each array is correctly prefixed with the prefix associated with the specified namespace.

  Gets or sets the namespace of the XML element.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  Use the enumeration to instruct the to generate code that sets the property.

  Once the property has been used on one public property or field in a type, it must be applied to all public properties and fields for that type and all inherited types.

  Gets or sets the explicit order in which the elements are serialized or deserialized.