You can prefix attributes names with a namespace prefix just like element
names. For example, in the following snippet, the value attribute of the
belongs to the payroll namespace http://www.developerfusion.com/schemas/payroll/:
However, default the namespaces does not apply to attribute names. For example, in the following snippet, the id attribute does not belong to any namespace even though there’s a default namespace declared:
<employee xmlns="http://www.devxpert.com/schemas/hr/" id="90385">
I hope that this article has helped you understand XML Namespaces and how they work. If you’re not familiar with XSD schemas, stay tuned for my upcoming articles on this topic. Learning XSD will help you fully understand XML Namespaces.