Definition - What does Namespace mean?

A namespace is used to uniquely identify one or more names from other similar names of different objects, groups or the namespace in general. Namespace makes it possible to distinguish objects with similar names but different origins. In XML, a namespace is a collection of element type and attribute names, each of which which can be identified by the unique namespace to which they belong.

Namespace is also known as name scope.

Techopedia explains Namespace

Namespace is primarily used in programming languages where the same name may be used for different objects. It is created to group together those names that might be repeated elsewhere within the same or interlinked programs, objects and elements.

For example, an XML namespace consists of element types and attribute names. Each of the names within that namespace is only related/linked to that namespace. The name is uniquely identified by the namespace identifier ahead of the name. For example Namespace1_ John and Namespace2_John are same names but within different namespaces.

Share this: