System.Xml.Serialization.XmlRootAttribute.Namespace Property

Gets or sets the namespace for the XML root element.

Syntax

public string Namespace { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The XmlArrayItemAttribute.Namespace property conforms to the World Wide Web Consortium (www.w3.org) specification named Namespaces in XML.

To create prefixed namespaces in the XML document, create an System.Xml.Serialization.XmlSerializerNamespaces object that contains all the prefix-namespace pairs. The namespace you set for each System.Xml.Serialization.XmlArrayAttribute must be contained in the System.Xml.Serialization.XmlSerializerNamespaces object. When the System.Xml.Serialization.XmlSerializer generates the document, it correctly prefixes the element name for each array item.

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