XmlSerializerNamespaces.Add Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Adds a prefix and namespace pair to an XmlSerializerNamespaces object.
Assembly: System.Xml.Serialization (in System.Xml.Serialization.dll)
Parameters
- prefix
- Type: System.String
The prefix associated with an XML namespace.
- ns
- Type: System.String
An XML namespace.
If you want the XmlSerializer to qualify the element and attribute names in an XML document, you must Add the prefix and namespace pairs to an XmlSerializerNamespaces object.
Any namespaces that you add must conform to the www.w3.org specification, Namespaces in XML.
Show: