Just define the namespace in the root tag (or where you need the namespace). Example:
<root xmlns:ns="some_identifier">
ns , and the identifier can be (almost) anything. See this quote :
What are the names of the dot names in the dot?
One of the confusing things about all this is that namespace names are URLs; itβs easy to assume that since they are web addresses, they must be the address of something. They are not; these are URLs, but the namespace design doesn't care what (if anything) they point to. Think of an XML.com programmer looking for book titles; which works fine without a namespace name pointing to anything.
The reason the W3C decided to use URLs as namespace names is because they contain domain names (for example, www.xml.com) that work all over the world over the Internet.
The Wikipedia article is also quite informative.
I hope you know that you need namespaces to distinguish tags with the same name.
Felix kling
source share