Q1. Which of the following is a \"well formed\" XML document: A. <firstElement>s
ID: 3583716 • Letter: Q
Question
Q1. Which of the following is a "well formed" XML document:
A. <firstElement>some text goes here
<secondElement>another text goes here</secondElement>
</firstElement>
B. <firstElement>some text goes here</firstElement>
<secondElement> another text goes here</secondElement>
C. <?xml version="1.0"?>
<to>Sam</to>
<from>John</from>
<heading>Reminder</heading>
<body>Please save my mobile number !</body>
D. <?xml version="1.0"?>
<note>
<to>Sam</to>
<from>John</from>
<heading>Reminder</heading>
<body>Save my Mobile Number!</body>
</note>
Explanation / Answer
correct format of xml is option D
D. <?xml version="1.0"?>
<note>
<to>Sam</to>
<from>John</from>
<heading>Reminder</heading>
<body>Save my Mobile Number!</body>
</note>
note defines as root element
child elements of roots are to ,from, heading and body
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.