The definitions in an XML document are said to be __________ when the tagging…

20182025

The definitions in an XML document are said to be __________ when the tagging system and definitions in the DTD are all in compliance.

  1. A.

    well-formed 

  2. B.

    reasonable 

  3. C.

    valid 

  4. D.

    logical

Attempted by 168 students.

Show answer & explanation

Correct answer: C

Correct answer: valid.

Explanation: An XML document is well-formed if it follows XML syntax rules (properly nested tags, a single root element, matching start/end tags, and quoted attribute values). It is valid when it is well-formed and also conforms to the element and attribute declarations in an associated DTD or XML Schema.

  • Well-formed: ensures correct XML syntax but says nothing about whether element names, allowed children, or attributes match a DTD/schema.

  • Valid: additionally requires that the document's structure and tag usage conform to rules defined in the DTD or Schema (element declarations, allowed content, attribute lists, etc.).

  • How this matches the question: the phrase "tagging system and definitions in the DTD are all in compliance" describes conformity to the DTD, which is the definition of a valid XML document.

  • How to check: use an XML parser with validation enabled or an online validator to verify that the document conforms to its DTD or Schema.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Tpsc Assistant Technical Officer