StaticContextSettings.DefaultElementNamespace PropertyStaticContextSettings.DefaultElementNamespace PropertyStaticContextSettings::DefaultElementNamespace Property
Property Value
Type: System.StringSystem.StringSystem::String^
A stringStringString representing the default namespace for elements and types.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | DefaultElementNamespaceDefaultElementNamespaceDefaultElementNamespace was set to null
a null reference (Nothing in Visual Basic)
nullptr |
ArgumentExceptionArgumentExceptionArgumentException | Raised if DefaultElementNamespaceDefaultElementNamespaceDefaultElementNamespace was set to http://www.w3.org/XML/1998/namespace . |
Remarks
Setting this property is equivalent to calling DeclareNamespace(string.Empty, value)
.
Unless explicitly set, the default element namespace is the namespace bound to the empty prefix by the IXmlNamespaceResolverIXmlNamespaceResolverIXmlNamespaceResolver specified by the NamespacesNamespacesNamespaces property.
This is a namespace URI or EmptyEmptyEmpty. The namespace URI, if present, is used for any unprefixed qualified names appearing in a position where an element or type name is expected.
This can be overridden with a declare default element namespace
declaration in the query.