Contains the XML namespaces and prefixes that the System.Xml.Serialization.XmlSerializer uses to generate qualified names in an XML-document instance.
See Also: XmlSerializerNamespaces Members
The System.Xml.Serialization.XmlSerializerNamespaces contains a collection of XML namespaces, each with an associated prefix. The System.Xml.Serialization.XmlSerializer uses an instance of the System.Xml.Serialization.XmlSerializerNamespaces class to create qualified names in an XML document.
XML namespaces contained by the System.Xml.Serialization.XmlSerializerNamespaces must conform to the www.w3.org specification named Namespaces in XML.
XML namespaces provide a way to qualify the names of XML elements and attributes in XML documents. A qualified name consists of a prefix and a local name, separated by a colon. The prefix functions only as a placeholder; it is mapped to a URI that specifies a namespace. The combination of the universally-managed URI namespace and the local name produces a name that is guaranteed to be universally unique.
To create qualified names in an XML document:
[The 'ordered' type of list has not been implemented in the ECMA stylesheet.]The creation of an empty namespace and prefix pair is not supported. That is, you cannot create a pair using the following code:
Example
XmlSerializerNamespaces ns = new XmlSerializerNamespaces(); ns.Add("", "");
Example
Dim ns As XmlSerializerNamespaces ns = New XmlSerializerNamespaces() ns.Add("", "")