QuestionQ50

VerifiedData Serialization

Which statement about XML namespaces is correct?

A. XML namespaces identify the root of an XML document.

B. XML namespaces sort data based on element names.

C. XML namespaces describe the number of levels in the XML hierarchy.

D. XML namespaces guarantee that element names and values are unique.

Explanation

XML namespaces are used to prevent element and attribute name collisions when XML content from multiple vocabularies or sources is combined into a single document. Each namespace is identified by a unique URI, and by qualifying names with a namespace prefix, XML processors can distinguish between identically named elements that originate from different schemas, effectively guaranteeing uniqueness of names within the document. This is the core purpose defined in the W3C 'Namespaces in XML' specification — namespaces have no role in identifying the document root, sorting data, or describing hierarchy depth.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!