Hey welcome back again … in this tutorial i will discuss about xml namespace .. As you know xml offer you to create your own elements or tags whatever you say .. so for this during the time you create a lot of element in lot of xml files a confliction between the elements name easily occur .. To remove this confliction xml also offer you to define namespaces ..
Lets see an example …
<title>The mind freak</title>
Now you have this two xml files and Suppose somehow you have combine this two xml files … when you do this an error will show up to you because magician and bookstore element both contain a descendant named title ..
Let see how can we fix the error ..
<b:bookstore xmlns:b =“http://www.website-name.com/page”>
<m:magician xmlns:m =“http://www.website-name.com/page”>
<m:title>The mind freak</m:title>
In this code we use an attributes call xmlns that means xml name spaces which is in short form xmlns …
This is how we can fix such types of error using xml namespaces ..