You are on page 1of 3

Certainly!

Here are the XML-related multiple-choice questions along with their correct answers:

1. What is the purpose of an XML namespace?

a) To provide a unique name for elements and attributes

b) To link XML documents to their schemas

c) To define the character encoding of an XML document

d) To specify the version of the XML standard being used

Correct Answer: a) To provide a unique name for elements and attributes

2. Which of the following is the correct way to declare an XML version and encoding?

a) <xml version="1.0" encoding="UTF-8">

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

c) <!xml version="1.0" encoding="UTF-8">

d) <xml version="1.0" encoding="UTF-8"/>

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

3. Which of these statements about XML is FALSE?

a) XML is case-sensitive.

b) XML is a data description language.

c) XML tags are predefined.

d) XML can be used to exchange data between different systems.

Correct Answer: c) XML tags are predefined.

4. What does XSLT stand for?

a) eXtensible Stylesheet Language Transformations

b) eXtensible Systems Language Technology

c) eXtensible Scripting Language Template

d) eXtensible Simple Language Text

Correct Answer: a) eXtensible Stylesheet Language Transformations


5. What is the main use of XML?

a) To display data on the web

b) To store and transport data

c) To execute server-side scripts

d) To encrypt data for secure transmissions

Correct Answer: b) To store and transport data

6. What is a well-formed XML document?

a) An XML document with correct syntax

b) An XML document that validates against a DTD or Schema

c) An XML document that includes a stylesheet reference

d) An XML document that uses short tags

Correct Answer: a) An XML document with correct syntax

7. Which of the following is NOT an XML parser type?

a) DOM

b) SAX

c) XSLT

d) PULL

Correct Answer: c) XSLT

8. An XML document can have:

a) Multiple root elements

b) One root element

c) No root elements

d) Any number of root elements as long as they are sequential

Correct Answer: b) One root element


9. In XML, CDATA section is used to:

a) Declare character encoding

b) Include data that should not be parsed

c) Store metadata about the document

d) Define a cache-control mechanism

Correct Answer: b) Include data that should not be parsed

10. Which is the correct way to end an empty element in XML?

a) <element></element>

b) <element>

c) <element/>

d) </element>

Correct Answer: c) <element/>

These questions cover basic to advanced topics in XML, from syntax and structure to parsing and
transformations.

You might also like