Skip to content
Related Articles

Related Articles

GATE | GATE-IT-2004 | Question 89

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 28 Jun, 2021
Consider an XML file called intro.xml and a document type defintion (DTD) file intro.dtd as follows:


<?xml version = "1.0"?>

<!DOCTYPE myMessage SYSTEM "intro.dtd"›


<message>Welcome to XML</message>



<! ELEMENT myMessage (message)>

<! ELEMENT message (#PCDATA)>

A validating parser will classify intro.xml as
(A) Well-formed and validated
(B) Well-formed but not validated
(C) Validated but not well-formed

Answer: (A)

Explanation: The difference between well-formed and valid XML is simple: Valid XML has a DTD associated with it and has been verified against all the rules contained in the DTD in addition to being well-formed. Merely well-formed XML, on the other hand, is not necessarily valid, although it may be. In order to know the rules for a well formed document click here

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!