In essence the purpose is to avoid conflict of names too, equal to the namespace C# or C++. The declaration and import syntax is different, but it works analogously (not identical). It remains only one surname for its members.
The idea came from XML. There was a little more sense to use Uris, after all it is used for data exchange with third parties and the chance of two names of the own namespace conflict is very big. What is the way to ensure that your namespace is unique? Use a name that you have control over, that no one else can use the same one (not that there is a ban, but there is a convention, those who do not follow want trouble). A name you have control of is a URI with your internet domain. And it’s just that, a name.
Because there is a URI many people think that it serves to connect on the internet and pick something up. Nothing! It is only a descriptive text, nothing prevents you from using something else, but then the risk of conflict becomes greater.
In XAML, which is used in a more restricted environment, the chance is much lower, yet there is a risk when using third-party components. Anyway it kept the XML convention.
Often this is a mapping with the namespace code C#. Example:
clr-namesapce:System.Collections;assembly=mscorlib
I’ll leave some references that I may not have read and should help:
If you have other more specific questions you can go doing individually.
You have some specific doubt, because if you already know how it is in C#/C++, you already know almost everything you need to know, basically it has a different syntax. I mean, I’m finding the question a little broad.
– Maniero
My knowledge of XML is very little. But I know that namespaces in C# and C++ for example have the purpose of avoiding name conflicts. What is the purpose of XML namespaces? And pq usually point to a URL address? Temalso wanted to understand the syntax
xmlns:anyLetter
– Matheus Saraiva