ITPEC FE Morning October 2021 Question 10
Which of the following is an appropriate description of XML?
Explanation
User-defined tags describe a document's structure and attributes — XML is a meta-language: you invent the element and attribute names that fit your data.
XML (Extensible Markup Language) is a W3C standard derived from SGML. Tags such as <order> or <price currency="USD"> are chosen by the user, optionally constrained by a DTD or XML Schema, so the markup carries the logical structure and attributes of the data rather than its appearance.
Answer (d)
Why not others:
- •(a) — an XML document is plain text; any text editor can create it
- •(b) — XML keeps structure apart from presentation; the look is supplied separately by a style sheet such as CSS or XSL
- •(c) — XML is not built on HTML; both come from SGML, and XML is a simplified subset of it. HTML has a fixed tag set, XML an open one
Key rule: HTML describes how content is presented with a fixed set of tags; XML describes what the data is with tags you define.
Algorithm and Programming · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.