×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

XML Multiple-Choice Questions (MCQs)

XML is a markup language and also a file format that is used to store, transmit, and reconstruct arbitrary data. XML defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.

XML MCQs: This section contains multiple-choice questions and answers on the various topics of XML. Practice these MCQs to test and enhance your skills on XML.

List of XML MCQs

1. XML stands for ____.

  1. eXtensible Margin Language
  2. Xtensible Markup Language
  3. eXtensible Markup Language
  4. Xtensible Margin Language

Answer: C) eXtensible Markup Language

Explanation:

XML stands "eXtensible Markup Language".

Discuss this Question


2. XML is designed to ____ and ____ data.

  1. design, style
  2. design, send
  3. store, style
  4. store, transport

Answer: D) store, transport

Explanation:

XML is designed to store and transport data.

Discuss this Question


3. XML Schema, published as a W3C recommendation in ____.

  1. May 2001
  2. May 2000
  3. May 1999
  4. May 1998

Answer: A) May 2001

Explanation:

XML Schema, published as a W3C recommendation in May 2001.

Discuss this Question


4. ____is used to read XML documents and provide access to their content and structure.

  1. XML Processor
  2. XML Pre-processor
  3. XML Compiler
  4. XML Interpreter

Answer: A) XML Processor

Explanation:

XML processor is used to read XML documents and provide access to their content and structure.

Discuss this Question


5. An XML document is a string of ____.

  1. HTML character codes
  2. XML codes
  3. ASCII codes
  4. Characters

Answer: D) Characters

Explanation:

An XML document is a string of characters, it may contain almost every Unicode character.

Discuss this Question


6. In an XML document, a tag is a markup construct that starts with ___ and ends with ____.

  1. <, >
  2. <!--, -->
  3. <#, >
  4. @, @

Answer: A) <, >

Explanation:

In an XML document, a tag is a markup construct that starts with < and ends with >.

Discuss this Question


7. How many types of tags are there in an XML document?

  1. 3
  2. 4
  3. 5
  4. 6

Answer: A) 3

Explanation:

In an XML document, there are three types of tags and they are;

  • start-tag, such as <section>;
  • end-tag, such as </section>;
  • empty-element tag, such as <line-break />.

Discuss this Question


8. Which is the correct XML declaration?

  1. <xml version="1.0" encoding="UTF-8"/>
  2. <xml version="1.0" encoding="UTF-8"></xml>
  3. <?xml version="1.0" encoding="UTF-8"?>
  4. <?xml type="document" version="1.0" encoding="UTF-8"?>

Answer: C) <?xml version="1.0" encoding="UTF-8"?>

Explanation:

The correct XML declaration is:

<?xml version="1.0" encoding="UTF-8"?>

Discuss this Question


9. In an XML document, the comments are written within ____.

  1. /* and */
  2. <!-- and -->
  3. <# and >
  4. @ and @

Answer: B) <!-- and  -->

Explanation:

In an XML document, the comments are written within <!-- and -->.

Discuss this Question


10. In XML, DTD stands for ____.

  1. Document Type Declaration
  2. Data Type Definition
  3. Document Type Definition
  4. Document To Declaration

Answer: C) Document Type Definition

Explanation:

In XML, DTD stands for "Document Type Definition".

Discuss this Question


11. A Document Type Definition (DTD) is a set of ____ which is used to define the type of document for an SGML-family markup language.

  1. markup definition
  2. markup document
  3. main declarations
  4. markup declarations

Answer: D) markup declarations

Explanation:

A Document Type Definition (DTD) is a set of markup declarations which is used to define the type of document for an SGML-family markup language.

Discuss this Question


12. With respect to XML, SGML stands for ____.

  1. Standard Generalized Markup Language
  2. Standard General Markup Language
  3. Strainer Generalized Markup Language
  4. Standard Global Markup Language

Answer: A) Standard Generalized Markup Language

Explanation:

With respect to XML, SGML stands for "Standard Generalized Markup Language".

Discuss this Question


13. XML tags are case-sensitive?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, XML tags are case-sensitive. The following line of code is an example of wrong syntax.

<name>Alex</Name>

Discuss this Question


14. Which is the correct syntax of an empty element in XML?

  1. <#element_name attribute1 attribute2...#>
  2. <element_name attribute1 attribute2.../>
  3. <element_name attribute1 attribute2…>
  4. <element_name attribute1 attribute2...></element_name>

Answer: B) <element_name attribute1 attribute2.../>

Explanation:

The correct syntax of an empty element in XML is:

<element_name attribute1 attribute2.../>

Discuss this Question


15. An XML element can have ____.

  1. multiple attributes
  2. only two unique attributes
  3. multiple unique attributes
  4. None of the above

Answer: C) multiple unique attributes

Explanation:

An XML element can have multiple unique attributes.

Discuss this Question


16. Which is not a correct attribute type?

  1. StringType
  2. ArrayType
  3. TokenizedType
  4. EnumeratedType

Answer: B) ArrayType

Explanation:

The "ArrayType" is not a correct type.

Discuss this Question


17. If element ONE is contained by element TWO, then ONE is known as ____ of TWO.

  1. ancestors
  2. family
  3. descendant
  4. child

Answer: C) descendant

Explanation:

If element ONE is contained by element TWO, then ONE is known as descendant of TWO.

Discuss this Question


18. The containing element which contains other elements is called ____ of other element.

  1. ancestor
  2. family
  3. descendant
  4. child

Answer: A) ancestor

Explanation:

The containing element which contains other elements is called ancestor of other element.

Discuss this Question


19. Which is the correct syntax to link XML file with CSS?

  1. <?xml type="text/css" href="file.css"?>
  2. <?xml type="text/css" src="file.css"?>
  3. <?xml-stylesheet type="text/css" href="file.css"?>
  4. <?xml-stylesheet type="text/css" src="file.css"?>

Answer: C) <?xml-stylesheet type="text/css" href="file.css"?>

Explanation:

The correct syntax to link XML file with CSS is:

<?xml-stylesheet type="text/css" href="file.css"?>

Discuss this Question


20. What does SAX stand for ____.

  1. Simple Application for XML
  2. Safe API for XML
  3. Super Application for XML
  4. Simple API for XML

Answer: D) Simple API for XML

Explanation:

SAX stands for "Simple API for XML".

Discuss this Question


21. SAX in XML is used for ____.

  1. Defining format of an XML document
  2. Validating the XML file
  3. Parsing XML documents
  4. None of the above

Answer: C) Parsing XML documents

Explanation:

SAX is used for parsing XML documents.

Discuss this Question


22. Does SAX Parser create any internal structure?

  1. Yes
  2. No

Answer: B) No

Explanation:

No, SAX Parser does not create any internal structure.

Discuss this Question


23. In XML DOM, what does DOM stand for ____.

  1. Document Object Model
  2. Date Object Model
  3. Document Oriented Model
  4. Document Open Model

Answer: A) Document Object Model

Explanation:

In XML DOM, DOM stands for "Document Object Model".

Discuss this Question


24. How many types of XML databases?

  1. 2
  2. 3
  3. 4
  4. 5

Answer: A) 2

Explanation:

There are two types of XML databases.

  • XML-enabled database
  • Native XML database (NXD)

Discuss this Question


25. From the below given options, which is not a W3C-recommended Specification?

  1. SAX
  2. DOM
  3. Both A and B
  4. None of the above

Answer: A) SAX

Explanation:

SAX is not a W3C-recommended Specification.

Discuss this Question


26. What does XSNL stand for ____.

  1. XML Simple Neutral Language
  2. XML Software Neutral Language
  3. XML Search Natural Language
  4. XML Search Neutral Language

Answer: D) XML Search Neutral Language

Explanation:

XSNL stand for "XML Search Neutral Language".

Discuss this Question


27. XSNL acts between the meta search interface and targeted system.

  1. meta search interface, XML document
  2. meta search interface, targeted system
  3. XML document, targeted system
  4. None of the above

Answer: B) meta search interface, targeted system

Explanation:

XSNL acts between the "meta search interface" and "targeted system".

Discuss this Question


28. Which options are true regarding a well-formed XML document?

  1. Each tag must have a closing tag
  2. The opening and closing tag are the same i.e., their case must be the same
  3. The child tag must be closed within the parent tag i.e., as per the order, before closing the parent tag.
  4. All of the above

Answer: D) All of the above

Explanation:

All the above options (A, B, and C) and true to write a well-formed XML document,

  • Each tag must have a closing tag
  • The opening and closing tag are the same i.e., their case must be the same
  • The child tag must be closed within the parent tag i.e., as per the order, before closing the parent tag.

Discuss this Question


29. In an XML document, can we use graphics?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, the graphics can be used within an XML document.

Discuss this Question


30. In an XML document, a graphics can be stirred using the ____.

  1. XLink
  2. XPointer
  3. Both A and B
  4. None of the above

Answer: C) Both A and B

Explanation:

In an XML document, a graphics can be stirred using the XLink and XPointer.

Discuss this Question


31. Can we create internal linking using XLink?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, we can create internal linking using XLink.

Discuss this Question


32. Which XLink attribute defines the URL to link to?

  1. xlink:path
  2. xlink:url
  3. xlink:src
  4. xlink:href

Answer: D) xlink:href

Explanation:

XLink attribute xlink:href defines / specifies the URL to link to within an XML document.

Discuss this Question


33. Which XLink attribute defines the type of the link?

  1. xlink:type
  2. xlink:kind
  3. xlink:types
  4. xlink:category

Answer: A) xlink:type

Explanation:

XLink attribute xlink:type defines / specifies the type of the link.

Discuss this Question


34. Which XLink attribute specifies where to open the link?

  1. xlink:target
  2. xlink:where
  3. xlink:show
  4. xlink:path

Answer: C) xlink:show

Explanation:

XLink attribute xlink:show specifies where to open the link.

Discuss this Question


35. What is the default value of XLink 'xlink:show' attribute?

  1. embed
  2. new
  3. replace
  4. other

Answer: C) replace

Explanation:

The default value of XLink xlink:show attribute is replace.

Discuss this Question


36. Which XML object is used to request data from the web server?

  1. XMLHttpReq
  2. XMLHttpRequest
  3. XMLHttpsReq
  4. XMLHttpsRequest

Answer: B) XMLHttpRequest

Explanation:

The XMLHttpRequest Object is used to request data from a web server.

Discuss this Question


37. Can all XML elements be accessed through the XML DOM?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, all XML elements can be accessed through the XML DOM.

Discuss this Question


38. Which is the correct XML DOM statement to get the text value of the first element named "city" in an XML document?

  1. result = xmlDoc.getElementsByTagName("city")([0]).childNodes[0].nodeValue;
  2. result = xmlDoc.getElementsByTagName("city").childNodes[0].nodeValue;
  3. result = xmlDoc.getElementsByTagName("city")[0].nodeValue;
  4. result = xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue;

Answer: D) result = xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue;

Explanation:

The correct XML DOM statement to get the text value of the first element named "city" in an XML document is:

result = xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue;

Discuss this Question


39. Is the following XML well-formed?

<book>
	<title>The Secret</title>
	<author>Rhonda Byrne</author>
	<pages>198</pages>
	<price>120.00</price>
</book>
  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, the above given XML well-formed.

Discuss this Question


40. XML has predefined tags?

  1. Yes
  2. No

Answer: B) No

Explanation:

No, XML has no predefined tags.

Discuss this Question


References:



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.