XML MCQ : Guess the Output (Multiple Choice Questions)
Question 1 |
<?xml version="1.0" encoding="ISO-8859-1"?>above line of code is used for ?
XML Starting Line | |
None of these | |
DTD Declaration | |
XML Declaration |
Question 2 |
<?xml version="1.0" encoding="ISO-8859-1"?>Guess which version of XML is used ?
2nd | |
1st | |
4th | |
3rd |
Question 3 |
<?xml version="1.0" encoding="ISO-8859-1"?> <book> <bname>XML Tutorials</bname> <pages>100</pages> <price>$300.00</price> </book>Which of the Node is considered as root node ?
<bname> | |
<pages> | |
<book> | |
<price> |
Question 4 |
<?xml version="1.0" encoding="ISO-8859-1"?> <book> <bname>XML Tutorials</bname> <pages>100</pages> <price>$300.00</price> </book>Which of the following statement is false if we consider above XML document ?
It is a document that refers a single book | |
Document Syntax is Self Explanatory | |
XML document forms a tree structure | |
XML document can have more than one book |
Question 4 Explanation:
Statement is partially true. We can have multiple book nodes in xml document but we need to modify syntax like this -
<?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book> <bname>XML Tutorials</bname> <pages>100</pages> <price>$300.00</price> </book> <book> <bname>XML Tutorials</bname> <pages>100</pages> <price>$300.00</price> </book> </bookstore>
Question 5 |
<book category="Web"> <bname>XML Tutorials</bname> <pages>100</pages> <price>$300.00</price> </book>How many nodes and attributes are there in the document ?
4 Nodes and 2 Attributes | |
4 Nodes and 1 Attribute | |
2 Nodes and 2 Attributes | |
3 Nodes and 1 Attribute |
Question 5 Explanation:
"category" is only atribute in the above xml document.
There are 5 questions to complete.