XmlForm::NamespaceManager property

Office 2013 and later

Gets a reference to a XmlNamespaceManager object that can be used to resolve, add, or remove namespaces used in the form.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

No code example is currently available or this language may not be supported.

Property value

Type: System.Xml.XmlNamespaceManager
An XmlNamespaceManager that can be used resolve, add, or remove namespaces used in the form.

The XmlNamespaceManager object is initialized at load time with all the namespaces defined in the xDocumentClass element of the form template form definition file (.xsf).

A developer can use the instance of the XmlNamespaceManager class to resolve, add, or remove namespaces from the form template. For browser-enabled forms, the class is persisted on the server. All namespaces added using the XmlNamespaceManager class are persisted in the session state of the form template so that they are available across all requests for the form.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed from code running in forms opened in Microsoft InfoPath Filler or in a Web browser.

In the following code example, the NamespaceManager property is used to get an instance of the System.Xml.XmlNamespaceManager class that is then used to resolve namespaces when using the System.Xml.XPath.XPathNavigator.SelectSingleNode method to select a field.

No code example is currently available or this language may not be supported.
Show: