
1. Which of the following is NOT a valid XML tag?
a) <tag>
b) </tag>
c) &lt;tag>;
d) <tag/>
Answer: c) <tag>;
2. What does XML stand for?
a) Extended Markup Language
b) Extensible Markup Language
c) Executable Markup Language
d) Encrypted Markup Language
Answer: b) Extensible Markup Language
3. Which of the following is a valid XML document?
a) xml version="1.0" encoding="UTF-8" ?>
></tag>
b) xml version="1.0" ?>
></tag>
c) xml version="1.0" encoding="UTF-8" ?>
d) xml version="1.0" encoding="UTF-8"?>
/>
Answer: c) xml version=”1.0″ encoding=”UTF-8″ ?>
4. Which of the following is NOT a valid XML entity?
a) &amp;
b) &lt;
c) &gt;
d) &#
Answer: d) &#
5. Which of the following is used to define a namespace in XML?
a) <tag>
b) xmlns
c) </tag>
d) <tag/>
Answer: b) xmlns
6. Which of the following is NOT a valid XML attribute?
a) value
b) name
c) content
d) id
Answer: c) content
7. Which of the following is used to declare an XML schema?
a) DOCTYPE>
b) xml>
c) ELEMENT>
d) <xs:schema>
Answer: d) <xs:schema>
8. Which of the following is used to represent a comment in XML?
a) –>
b) //
c) /* */
d) ;
Answer: a) –>
9. Which of the following is NOT a valid XML data type?
a) string
b) boolean
c) integer
d) double
Answer: d) double
10. Which of the following is used to define the root element in XML?
a) </root>
b) ELEMENT>
c) <root>
d) <root/>
Answer: c) <root>
11. Which of the following is used to define an element in XML?
a) ELEMENT>
b) xml>
c) </tag>
d) <tag/>
Answer: a) ELEMENT>
12. Which of the following is used to indicate the end of an XML document?
a) </xml>
b) xml>
c) </tag>
d) <tag/>
Answer: d) <tag/>
13. Which of the following is used to include external entities in XML?
a) ENTITY>
b) DOCTYPE>
c) CDATA[ ]]>
d) xml version=”1.0″ ?>
Answer: b) DOCTYPE>
14. Which of the following is used to define an attribute in XML?
a) ELEMENT>
b) <attribute>
c) </tag>
d) <tag/>
Answer: d) <tag/>
15. Which of the following is used to define an XML entity?
a) ELEMENT>
b) CDATA[ ]]>
c) ENTITY>
d) </tag>
Answer: c) ENTITY>
16. Which of the following is NOT a valid XML parser?
a) DOM
b) SAX
c) XPath
d) XSLT
Answer: c) XPath
17. Which of the following is used to select elements in XML?
a) DOM
b) SAX
c) XPath
d) XSLT
Answer: c) XPath
18. Which of the following is used to transform XML data into another format?
a) DOM
b) SAX
c) XPath
d) XSLT
Answer: d) XSLT
19. Which of the following is used to define an XML document type?
a) ELEMENT>
b) DOCTYPE>
c) CDATA[ ]]>
d)
Answer: b) DOCTYPE>
20. Which of the following is used to insert special characters in XML?
a) CDATA[ ]]>
b) ENTITY>
c) &nbsp;
d) <xml:lang>
Answer: c)
21. Which of the following is a valid XML attribute?
a) content-type
b) position
c) order
d) id
Answer: d) id
22. Which of the following is used to specify the version of XML being used?
a) <xml:lang>
b) xml version="1.0" ?>
c) CDATA[ ]]>
d) DOCTYPE>
Answer: b) xml version=”1.0″ ?>
23. Which of the following is used to define an XML element as empty?
a) </tag>
b) xml>
c) ELEMENT>
d) <tag/>
Answer: d) <tag/>
24. Which of the following is used to include JavaScript in an XML document?
a) <script>
b) CDATA[ ]]>
c) ENTITY>
d) xml version="1.0" ?>
Answer: b) CDATA[ ]]>
25. Which of the following is used to include CSS in an XML document?
a) <style>
b) /**<br>
c) ELEMENT>
d) <tag/>
Answer: a) <style>
26. Which of the following is used to indicate a processing instruction in XML?
a) ?>
b) ELEMENT>
c) CDATA[ ]]>
d) xml version=”1.0″ ?>
Answer: a) ?>
27. Which of the following is used to eliminate unnecessary white space in an XML document?
a) <xml:space>
b) CDATA[ ]]>
c) DOCTYPE>
d) <tag/>
Answer: a) <xml:space>
28. Which of the following is NOT a valid XML character data type?
a) CDATA
b) PCDATA
c) DTD
d) ENTITY
Answer: c) DTD
29. Which of the following is used to reference an external DTD in XML?
a) DOCTYPE>
b) CDATA[ ]]>
c) &lt;
d) </tag>
Answer: a) DOCTYPE>
30. Which of the following is used to define the encoding of an XML document?
a) <xml:encoding>
b) xml version="1.0" encoding="UTF-8" ?>
c) CDATA[ ]]>
d) ELEMENT>
Answer: b) xml version=”1.0″ encoding=”UTF-8″ ?>
31. Which of the following is NOT a valid XML schema data type?
a) boolean
b) string
c) decimal
d) character
Answer: d) character
32. Which of the following is used to define the occurrence of an XML element?
a) minOccurs
b) maxOccurs
c) ENTITY>
d) ELEMENT>
Answer: a) minOccurs
33. Which of the following is used to specify a default value for an XML attribute?
a) default
b) ELEMENT>
c) CDATA[ ]]>
d) <tag/>.
Answer: a) default
34. Which of the following is used to specify a unique attribute in XML?
a) unique
b) ELEMENT>
c) CDATA[ ]]>
d) ENTITY>
Answer: a) unique
35. Which of the following is used to specify the maximum length of an XML string?
a) length
b) ELEMENT>
c) CDATA[ ]]>
d) <tag/>
Answer: a) length
36. Which of the following is used to specify the minimum length of an XML string?
a) minLength
b) ELEMENT>
c) CDATA[ ]]>
d) <tag/>
Answer: a) minLength
37. Which of the following is used to specify the format of an XML string?
a) pattern
b) ELEMENT>
c) CDATA[ ]]>
d) <tag/>
Answer: a) pattern
38. Which of the following is used to define a choice of XML elements?
a) choice
b) ENTITY>
c) CDATA[ ]]>
d) ELEMENT>
Answer: a) choice
39. Which of the following is used to define a sequence of XML elements?
a) sequence
b) CDATA[ ]]>
c) attribute
d) ELEMENT>
Answer: a) sequence
40. Which of the following is used to specify the namespace of an XML element?
a) xmlns
b) ELEMENT>
c) CDATA[ ]]>
d) ENTITY>
Answer: a) xmlns
41. Which of the following is used to specify the target namespace of an XML schema?
a) targetNamespace
b) ELEMENT>
c) CDATA[ ]]>
d) ENTITY>
Answer: a) targetNamespace
42. Which of the following is used to specify the namespace prefix in an XML document?
a) prefix
b) xmlns
c) attribute
d) ELEMENT>
Answer: b) xmlns
43. Which of the following is used to define an XML element as optional?
a) minOccurs="0"
b) maxOccurs="1"
c) ELEMENT>
d) <tag/>
Answer: a) minOccurs=”0″
44. Which of the following is used to specify the order of XML elements?
a) sequence
b) choice
c) minOccurs
d) maxOccurs
Answer: c) minOccurs
45. Which of the following is used to define an XML element as required?
a) minOccurs="1"
b) maxOccurs="1"
c) ELEMENT>
d) <tag/>
Answer: a) minOccurs=”1″
46. Which of the following is used to define a XML element as repeating?
a) maxOccurs="unbounded"
b) minOccurs="1"
c) <tag/>
d) ELEMENT>
Answer: a) maxOccurs=”unbounded”
47. Which of the following is used to reference an XML schema in an XML document?
a) xsi:schemaLocation
b) targetNamespace
c) xmlns
d) <tag/>
Answer: a) xsi:schemaLocation
48. Which of the following is used to define an XML element as empty or containing only whitespace?
a) whiteSpace
b) ELEMENT>
c) CDATA[ ]]>
d) <tag/>
Answer: a) whiteSpace
49. Which of the following is used to define the length of an XML attribute?
a) length
b) minOccurs
c) maxOccurs
d) ELEMENT>
Answer: a) length
50. Which of the following is used to define the minimum value of an XML attribute?
a) minInclusive
b) maxInclusive
c) minOccurs
d) maxOccurs
Answer: a) minInclusive
- Top 10 DevOps Trainers in the world - October 7, 2023
- What is Cookies and Why it is Used? - May 24, 2023
- TOP trends of transitions in TikTok - May 10, 2023