The namespace in XML is used to prevent tag naming collisions.
Because XML is a meta-language that allows you to define your own elements and attributes, there is significant concern that both you and I might define an element with the same name. For instance, let's imagine that you've created a DTD (Document Type Definition -- the definition file of an XML language) which allows you to define where people sit in a banquet hall. Further, let's pretend I'm hosing a Poker Tournament at your banquet hall.
In both DTDs, we have an element called "table." But they mean different things. If we tried to use both DTDs together, a hot mess would ensue. You're data type wouldn't validate against my DTD, and vice versa.
So we use namespaces. In XML, we use a namespace by adding the xmlns attribute (that's XML Namespace.) The attribute takes a unique URL as it's value. It's important to note that this value is simply for uniqueness (in other words, it doesn't have to exist. The XML parser will not go looking for it.)
I can now attach my namespace directly to my table elements:
<table xmlns:p = "http://www.example.com/pokerTable">
...
</table>
Further, I define a "prefix" which in this case is p. Now, I can use the prefix when I add a tag. For instance
<p:seat>Data</seat>
You would use a separate prefix and xlmns value, and this would keep us from stepping on each other's toes.