.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Articles >> XML >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Purpose of XML Namespaces

Posted By:Deepika Haridas       Posted Date: September 25, 2009    Points: 25    Category: XML    URL: http://www.dotnetspark.com  

An XML Namespace is collection of element types and attribute names. It consists of two parts :

1) The first part is the URI used to identify the namespace
2) The second part is the element type or attribute name itself.

Together they form a unique name. 

The various purpose of XML Namespace are
1. Combine fragments from different documents without any naming conflicts. 
2. Write reusable code modules that can be invoked for specific elements and attributes. Universally unique names guarantee that 
such modules are invoked only for the correct elements and attributes. 
3. Define elements and attributes that can be reused in other schemas or instance documents without fear of name collisions. 

example, you might use XHTML elements in a parts catalog of shopping cart to provide part descriptions. Or you might use the nil attribute 
defined in XML Schemas to indicate a missing value.


Gold Street. 7
Ahmedabad< /addr:City>
gujarat< /addr:State>
India< /addr:Country>

OurWebServer< /serv:Name>

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend