Default declaration of Namespaces in XML

Default declaration of Namespaces in XML

The Microsoft xml parse provides support for associating elements and attributes with namespaces. There are two ways to declare namespaces one is default declaration and second id explicit declaration.

The default declaration declares a namespaces for all elements within scope. For example:

<CITY xmlns=''urn:BigCities.org:CityInfo''>

<TITLE></TITLE>

</CITY>

Above example declares the CITY element and all elements and attributes within it. The attribute xmlns is an xml keyword and is understood by the parser to be a namespaces declaration:

<CITY xmlns=''urn:BigCities.org:CityInfo''>

<TITLE>A capital city</TITLE>

<POPULATION> ten million </POPULATION>

</CITY>

Default declaration are ery useful when a node is from the same namespaces.