Default Namespaces

To declare and use the default namespace, you omit the alias and the colon from the declaration on the element as shown on this book element <BOOK xmlns="https://www.contoso.com/books.dtd">.

Any element that is not fully qualified with a namespace prefix belongs to the default namespace. When multiple namespaces are used within an XML document, defining one namespace as the default namespace provides a cleaner looking document. Only the elements from namespaces other than the default namespace need to be fully qualified. Default namespaces only apply to elements and do not apply to attributes.

See Also

Concepts

Namespaces in an XML Document

Namespace Declarations

Namespace Declaration Scope

Manage Namespaces Using the XmlNamespaceManager

Information Obtained from the XmlNamespaceManager