Which statement is true?
-
All the statements are true
-
All XML elements must have a closing tag
-
All XML elements must be lower case
-
All XML documents must have a DTD
The claimed answer B (All XML elements must have a closing tag) is correct. XML requires every opening tag to have a corresponding closing tag (or be self-closed with />). Option C is incorrect because XML is case-sensitive but doesn't require lowercase. Option D is incorrect because DTD is optional in XML.
A core rule of well-formed XML is that every element must have a matching closing tag (or be self-closing), unlike HTML where some tags like <br> or <img> can be left unclosed. XML doesn't require lowercase tag names (though it is case-sensitive) and doesn't mandate a DTD, since XML documents can be well-formed without being validated against one.