Export (0) Print
Expand All

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="http://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.

© 2014 Microsoft