XML namespace

XML namespaces are used for providing uniquely named elements and attributes in an XML document. They are defined in a W3C recommendation.[1][2] An XML instance may contain element or attribute names from more than one XML vocabulary. If each vocabulary is given a namespace, the ambiguity between identically named elements or attributes can be resolved.

A simple example would be to consider an XML instance that contained references to a customer and an ordered product. Both the customer element and the product element could have a child element named id. References to the id element would therefore be ambiguous; placing them in different namespaces would remove the ambiguity.

  1. ^ Bray, Tim; Dave Hollander; Andrew Layman; Richard Tobin; Henry S. Thompson (December 2009). "Namespaces in XML 1.0". W3C. Retrieved 9 October 2010.
  2. ^ "XML and Semantic Web W3C Standards Timeline (v.1.2)" (PDF).