What is a namespace?

Namespaces are the solution to naming conflicts (also known as collisions) in XML. Using XML namespaces can help alleviate issues that arise where XML elements and attributes use identical names.

XML namespaces help to identify and resolve conflicts between elements that have the same name but mean different things. An XML namespace is a domain that contains a set of element declarations and type definitions.

An analogy is women's clothing sizes. A size eight is not always the same size eight, because women's clothing is designed in junior, misses, and petites. These various size eights, which may represent different specifications, can exist in several domains. To solve this issue, each domain will need to be identified with a different namespace.