Back to the 2025 paper

Module I: Introduction to Web Technologies and Architectures

20252m

Which of the following is used to define the structure of an XML document?

(i) XSL
(ii) DTD
(iii) CSS
(iv) HTML

Worked SolutionAI Assisted

Correct Answer: (ii) DTD

Explanation:

  • DTD (Document Type Definition) defines the legal structure, elements, attributes, and data types of an XML document.
  • It validates the syntax and layout of an XML document to ensure it conforms to the intended schema.
  • XSL (Extensible Stylesheet Language) is used for transforming and formatting XML documents.
  • CSS (Cascading Style Sheets) is used for presentation and styling.
  • HTML is a markup language for web page structure, not XML schema definition.

Example of DTD Declaration:

<!DOCTYPE note [
  <!ELEMENT note (to,from,heading,body)>
  <!ELEMENT to (#PCDATA)>
  <!ELEMENT from (#PCDATA)>
  <!ELEMENT heading (#PCDATA)>
  <!ELEMENT body (#PCDATA)>
]>

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.