Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

XmlNamespaceManager.DefaultNamespace Property

Definition

Namespace:
System.Xml
Assemblies:
System.Xml.dll, System.Xml.ReaderWriter.dll
Assemblies:
netstandard.dll, System.Xml.ReaderWriter.dll
Assembly:
System.Xml.ReaderWriter.dll
Assembly:
System.Xml.dll
Assembly:
netstandard.dll
Source:
XmlNamespacemanager.cs
Source:
XmlNamespacemanager.cs
Source:
XmlNamespacemanager.cs
Source:
XmlNamespacemanager.cs
Source:
XmlNamespacemanager.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Gets the namespace URI for the default namespace.

public:
 virtual property System::String ^ DefaultNamespace { System::String ^ get(); };
public virtual string DefaultNamespace { get; }
member this.DefaultNamespace : string
Public Overridable ReadOnly Property DefaultNamespace As String

Property Value

The namespace URI for the default namespace, or an empty string if there is no default namespace.

Examples

The following example displays the default namespace, if one exists.

if (nsmgr.HasNamespace(String.Empty))
 Console.WriteLine(nsmgr.DefaultNamespace);
If nsmgr.HasNamespace(String.Empty) Then
 Console.WriteLine(nsmgr.DefaultNamespace)
End If

Remarks

This method is equivalent to calling LookupNamespace(String.Empty).

Applies to

See also


Feedback

Was this page helpful?