In XML, DOCTYPE declaration specifies to include a reference to _______ file.

2015

In XML, DOCTYPE declaration specifies to include a reference to _______ file.

  1. A.

    Document type Definition

  2. B.

    Document type declaration

  3. C.

    Document transfer definition

  4. D.

    Document type language

Attempted by 165 students.

Show answer & explanation

Correct answer: A

Answer: Document Type Definition (DTD).

Explanation: The DOCTYPE declaration in an XML document specifies a reference to a Document Type Definition (DTD). A DTD defines the allowed elements, attributes, and overall structure of the XML document. The DTD can be included internally or referenced as an external .dtd file.

  • External DTD: referenced using SYSTEM or PUBLIC, for example: <!DOCTYPE root SYSTEM "example.dtd">

  • Internal DTD: the DTD rules are placed directly inside the DOCTYPE declaration (internal subset).

  • Purpose: DTDs are used for validation and to ensure the XML document follows the expected structure.

Explore the full course: Tpsc Assistant Technical Officer