StaticContextSettings.DefaultElementNamespace PropertyStaticContextSettings.DefaultElementNamespace PropertyStaticContextSettings::DefaultElementNamespace Property

Gets or sets the default namespace for element and type names.

Syntax

Public Property DefaultElementNamespace As String
        Get
        Set(ByVal value As String)
public string DefaultElementNamespace { get; set; }
public:
property String^ DefaultElementNamespace {
    String^ get();
    void set(String^ value);
}
 

Property Value

Type: System.StringSystem.StringSystem::String^

A stringStringString representing the default namespace for elements and types.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptionDefaultElementNamespaceDefaultElementNamespaceDefaultElementNamespace was set to null a null reference (Nothing in Visual Basic) nullptr
ArgumentExceptionArgumentExceptionArgumentExceptionRaised 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.