[go: up one dir, main page]

100% found this document useful (1 vote)
1K views31 pages

E - XML Final Exam

- The document appears to be a set of quiz questions about XML. It includes 24 multiple choice questions testing knowledge of XML concepts like XML databases, tags, DTDs, and more. - The questions cover a wide range of topics including XML syntax, structure, validation, schemas, databases, and languages/tools related to XML like XPath, XSLT, and XML Schema. - The questions have either a correct or incorrect marking indicating the answer chosen, with a running tally of marks.

Uploaded by

Ley Florencio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views31 pages

E - XML Final Exam

- The document appears to be a set of quiz questions about XML. It includes 24 multiple choice questions testing knowledge of XML concepts like XML databases, tags, DTDs, and more. - The questions cover a wide range of topics including XML syntax, structure, validation, schemas, databases, and languages/tools related to XML like XPath, XSLT, and XML Schema. - The questions have either a correct or incorrect marking indicating the answer chosen, with a running tally of marks.

Uploaded by

Ley Florencio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Question 1

Correct
Mark 1.00 out of 1.00

Flag question

Question text
Which of the following about XML Database is INCORRECT?

Select one:
a.
None of the choices
b.
There are two types of XML Database
c.
XML Database uses XQuery
d.
Oracle Database is an Example of XML Database

Question 2
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Comments in XML is given using the syntax:

Select one:
a.
<?----->
b.
</-- --->
c.
<!-----!>
d.
<!----->
Question 3
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Which of the following is the attribute is used to define a new XML Namespace?

Select one:
a.
xmlnpc
b.
xmlnmspc
c.
xmlnamespace
d.
xmlns

Question 4
Correct
Mark 1.00 out of 1.00

Flag question

Question text
In the tree structure below
Which tags are considered siblings?

Select one:
a.
<song>, <title>, and "Long Song"
b.
<song> and <title>
c.
<compose>, <genre>, <song> and <title>
d.
<title>, <composer>, and <genre>

Question 5
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following describes an XML element/tag?

Select one:
a.
his XML component shortens XML documents.
b.
These are considered as a foundation of an XML document.
c.
This is a way for XML to send special instructions to the XML Parser.
d.
This is an XML component contains details that set up an XML processor in parsing the
document.

Question 6
Correct
Mark 1.00 out of 1.00

Flag question

Question text
The use of Document definition in XML is:

Select one:
a.
creating XML templates
b.
XML doesn't need document definitions
c.
used to transform data
d.
This is used to validate XML documents

Question 7
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
To create attributes for elements in XML documents, we use the XML DOM function ____________.

Select one:
a.
createComment ()
b.
setAttribute()
c.
createTextNode
d.
createAttribute()

Question 8
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Observe the information below:
Song
Title: A Love Song
Composer: AA Bump
Genre: Rock
Which of the following XML code correctly represents the information above?

Select one:
a.
<Song>
<title>A Love Song<title>
<author>AA Bump<author>
<genre>Rock<genre>
</Song>
b.
<Song>
<title>A Love Song
<author>AA Bump
<genre>Rock
</Song>

c.
<Song>
<title>A Love Song</title>
<author>AA Bump</author>
<genre>Rock</genre>
</Song>
d.
<title>A Love Song</title>
<author>AA Bump</author>
<genre>Rock</genre>

Question 9
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Which of the following statements about XML DTD is TRUE?

Select one:
a.
With a DTD, independent groups of people can agree on a standard for interchanging data
b.
DTD is used to make sure the XML code is in the proper format.
c.
All of the choices
d.
By incorporating XML DTD in XML documents, errors can be found easily.

Question 10
Correct
Mark 1.00 out of 1.00

Flag question

Question text
To declare a complex type of XML schema, we use the tag/element _____

Select one:
a.
<xsd:choose>
b.
<xsd:sequence>
c.
<xsd:complex>
d.
<xsd:restriction>

Question 11
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following is statement is NOT FALSE?

Select one:
a.
Some data types like images are not represented well.
b.
Complex XML code can be difficult to read.
c.
All Statements are true
d.
XML is not suitable for large datasets.

Question 12
Correct
Mark 1.00 out of 1.00

Flag question

Question text
What does DTD stand for?

Select one:
a.
Document Type Definition
b.
Do The Dance
c.
Direct Type Definition
d.
Dynamic Type Definition

Question 13
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
In the XML Document below
<cinema>
<movie genre="horror">
<title lang="en">House in the Woods</title>
<director>Dan Morgan</director>
<year>1965</year>
</movie>
<movie genre="action">
<title lang="en">A time to Fight</title>
<director>Jake Johnson</director>
<year>1966</year>
</movie>
<movie genre="comedy">
<title lang="en">The adventures of Earl</title>
<director>Sam Clover</director>
<year>1975</year>
</movie>
<movie genre="drama">
<title lang="en">Cecilia's Heart</title>
<director>Jon Mills</director>
<year>1989</year>
</movie>
</cinema>
If we want to display the title "A time to Fight", we can use the command
Select one:
a.
xmlDoc.getElementsByTagName("title").[1]childNodes[1].nodeValue;
b.
xmlDoc.getElementsByTagName("title").[0]childNodes[1].nodeValue;
c.
xmlDoc.getElementsByTagName("title").[0]childNodes[0].nodeValue;
d.
xmlDoc.getElementsByTagName("title").[1]childNodes[0].nodeValue;

Question 14
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
In XML, this serves as an alternative for XML DTD.

Select one:
a.
XSLT
b.
XML Schema
c.
XPath
d.
XQuery

Question 15
Correct
Mark 1.00 out of 1.00

Flag question

Question text
This is used to make XML elements unique to avoid confusion among them
Select one:
a.
DTD
b.
XML Schema
c.
Namespaces
d.
XML Parser

Question 16
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following strings are correct XML names?

Select one:
a.
XMLElement123
b.
All of the choices
c.
xslElement
d.
xmlElement

Question 17
Correct
Mark 1.00 out of 1.00

Flag question

Question text
XSLT processors accept as input:
Select one:
a.
only an XSLT specification
b.
either an XML document or an XSLT specification
c.
an XML conforming document file and an XSLT specification file
d.
only an XML document

Question 18
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following describes an XML Entities?

Select one:
a.
This is an XML component contains details that set up an XML processor in parsing the
document.
b.
These are considered as a foundation of an XML document.
c.
This is a way for XML to send special instructions to the XML Parser.
d.
This XML component shortens XML documents.

Question 19
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following statements is NOT TRUE about XPath?

Select one:
a.
It is used to store data in XML
b.
It is a way of selecting data in XML
c.
Like XML DOM, it is based around noe
d.
It is a W3C standard

Question 20
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Only one of the following is considered an XML Database. Which one is it?

Select one:
a.
IBM DB2
b.
ACCESS
c.
Java
d.
MYSQL

Question 21
Incorrect
Mark 0.00 out of 1.00

Flag question
Question text
Observe the XML document below:

<cinema>
<movie genre="horror">
<title lang="en">House in the Woods</title>
<director>Dan Morgan</director>
<year>1965</year>
</movie>
<movie genre="action">
<title lang="en">A time to Fight</title>
<director>Jake Johnson</director>
<year>1966</year>
</movie>
<movie genre="comedy">
<title lang="en">The adventures of Earl</title>
<director>Sam Clover</director>
<year>1975</year>
<price>49.99</price>
</movie>
If we use the XPath expression //movie[@genre='drama'], the output will be:

Select one:
a.
All movies with genre equals to drama
b.
All movie who's genre is not drama
c.
All movies
d.
This will produce an error

Question 22
Incorrect
Mark 0.00 out of 1.00
Flag question

Question text
Which of the following is a well-formed XML document?

Select one:
a.
<firstelement>Text here </firstelement>
<secondelement> Text here </secondelement>
b.
<firstelement>Text here
<secondelement> Text here
</firstelement>
c.
<firstelement>Text here
<secondelement> Text here </secondelement>
</firstelement>
d.
<firstelement>Text here
<secondelement> Text here</firstelement>
</secondelement>

Question 23
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
<!DOCTYPE PersonalInformation [
<!ELEMENT PersonalInformation (name,contactnumber+,email?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT contactnumber (#PCDATA)>
<!ELEMENT email (#PCDATA)>
]>
In the XML DTD example above, contactnumber+ means ________.

Select one:
a.
It does not mean anything
b.
<contactnumber> element should contain at least one element or more
c.
<contactnumber> element should contain zero element or more
d.
<contactnumber> element is optional

Question 24
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
This is a type of XML database that provides for the conversion of database into XML document.

Select one:
a.
XML-enabled database
b.
Native XML database
c.
XPath
d.
XQuery

Question 25
Incorrect
Mark 0.00 out of 1.00
Flag question

Question text
This is a language used to transform XML documents into other XML documents, XHTML file, or
any other XML document formats.

Select one:
a.
XML Schema
b.
XPath
c.
XSLT
d.
DTD

Question 26
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following statement about XML is CORRECT?

Select one:
a.
XML can bridge the gap between two unrelated systems never intended to work with each
other.
b.
All of the choices
c.
XML is used to organize and describe information.
d.
XML is intended to be a standard of describing and structuring data over the internet.
Question 27
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following about XML declarations is FALSE?

Select one:
a.
You can use either single quote or double quote for the attribute elements.
b.
The parameters and values in a declaration are case sensitive and should always be in lower
case.
c.
XML declaration should have closing tag.
d.
The XML declaration should be the on the very first line of the document.

Question 28
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
The default model for complex type, in XML schemas for element is

Select one:
a.
no default type
b.
textOnly
c.
None of the choices
d.
elementOnly

Question 29
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
If you want to remove nodes, you can use the XML DOM function _________.

Select one:
a.
createElement()
b.
removeChild()
c.
replaceChild()
d.
getElementsByTagName()

Question 30
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Which of the following about XML attributes is INCORRECT?

Select one:
a.
Attributes are declared inside the opening tag.
b.
Tags are not case sensitive.
c.
The opening and closing tags should be identical
d.
Attributes should appear only once inside a tag.

Question 31
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following statement is INCORRECT

Select one:
a.
XML can be viewed using a browser
b.
XML tags/elements are predefined
c.
XML stands for extensive Markup Language
d.
XML is different from HTML

Question 32
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Which of the following statements about XPath is TRUE?

Select one:
a.
XPath paths are similar to the directories we use to access files on our computers.
b.
All of the choices
c.
XPath defines paths on XML documents.
d.
Predicates are refinements for selecting data in XPath

Question 33
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
On the XML document below:

To get the contact number with type "home", we can use the XPath

Select one:
a.
contactinfo/contactnumber[2]
b.
contactinfo/contactnumber[0]
c.
contactinfo/contactnumber
d.
contactinfo/contactnumber[1]

Question 34
Correct
Mark 1.00 out of 1.00
Flag question

Question text
This is a node without a child.

Select one:
a.
sibling node
b.
leaf node
c.
child node
d.
root node

Question 35
Correct
Mark 1.00 out of 1.00

Flag question

Question text
To match the specific XML elements in XSLT the syntax for given name "rootnode" is

Select one:
a.
<xsl:template match=” //”>
b.
<xsl:template match=” root”>
c.
<xsl:template match=” /”>
d.
<xsl:template match=” rootnode” >

Question 36
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
To add a created element/tag on our XML document we use the XML DOM function ________.

Select one:
a.
getElementsByTagName()
b.
replaceChild()
c.
createElement()
d.
appendChild()

Question 37
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Which of the following is a valid tag name for an XML Document?

Select one:
a.
my_tag
b.
xmlMyTag
c.
3myTag
d.
xml

Question 38
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
A DTD found inside an XML document is called a ___________

Select one:
a.
!DOCTYPE
b.
External DTD
c.
Internal DTD
d.
DTD

Question 39
Correct
Mark 1.00 out of 1.00

Flag question

Question text
To match the root node in XSLT transform the syntax will be

Select one:
a.
<xsl:template match=”Document”>
b.
<xsl:template match=”Root”>
c.
. <xsl:template match=”RootNode”>
d.
<xsl:template match=” /” >
Question 40
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
A well-formed XML document is ________

Select one:
a.
This is an XML Document that follows all the syntax rules.
b.
This is a process of validating an XML document
c.
None of the choices
d.
These are used to avoid conflict among element/tag names.

Question 41
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following describes the XLST element

Select one:
a.
This element can be used to extract the value of an XML element and add it to the output
stream of the transformation
b.
This element is used to build templates.
c.
This element is used to put a conditional test against the content of the XML file.
d.
This element is used to sort the output.

Question 42
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Observe the XML document below:

<cinema>
<movie genre="horror">
<title lang="en">House in the Woods</title>
<director>Dan Morgan</director>
<year>1965</year>
</movie>
<movie genre="action">
<title lang="en">A time to Fight</title>
<director>Jake Johnson</director>
<year>1966</year>
</movie>
<movie genre="comedy">
<title lang="en">The adventures of Earl</title>
<director>Sam Clover</director>
<year>1975</year>
<price>49.99</price>
</movie>
What is the XPath Expression to select all directors?

Select one:
a.
director
b.
/cinema/movie/director
c.
/movie/director
d.
/cinema/director

Question 43
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Which of the following description of XML is incorrect?

Select one:
a.
Complex XML code can be difficult to read.
b.
XML is best used for large data
c.
XML can run on both client and server side.
d.
One disadvantage of XML is that some data types like images are not represented well.

Question 44
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Which of the following is the correct description of XPath?

Select one:
a.
This is the syntax for defining parts of an XML document as well as to extract information on it.
b.
This is a combination of both HTML and XML.
c.
This technology takes an XML file and converts it into other format.
d.
This is a format for delivering dynamic content in the internet

Question 45
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Which of the following statement about XML DOM is INCORRECT?

Select one:
a.
A tree structure is based around nodes
b.
None of the choices
c.
A XML document is considered a document node
d.
XML DOM is presented in a tree structure

Question 46
Correct
Mark 1.00 out of 1.00

Flag question

Question text
To replace an existing node in an XML Document, we use the XML DOM function

Select one:
a.
removeChild()
b.
createElement()
c.
getElementsByTagName()
d.
replaceChild()

Question 47
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Observe the XML document below:

<cinema>
<movie genre="horror">
<title lang="en">House in the Woods</title>
<director>Dan Morgan</director>
<year>1965</year>
</movie>
<movie genre="action">
<title lang="en">A time to Fight</title>
<director>Jake Johnson</director>
<year>1966</year>
</movie>
<movie genre="comedy">
<title lang="en">The adventures of Earl</title>
<director>Sam Clover</director>
<year>1975</year>
<price>49.99</price>
</movie>
If we use the XPath expression //title, the output will be:
Select one:
a.
This will produce an error
b.
The first title element on the XML document
c.
All title elements
d.
All title element text

Question 48
Correct
Mark 1.00 out of 1.00

Flag question

Question text
A software capable of handling large amounts of data in XML form is called ________

Select one:
a.
XML Database
b.
XQuery
c.
XML RSS
d.
XPath

Question 49
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Observe the XML document below:
<cinema>
<movie genre="horror">
<title lang="en">House in the Woods</title>
<director>Dan Morgan</director>
<year>1965</year>
</movie>
<movie genre="action">
<title lang="en">A time to Fight</title>
<director>Jake Johnson</director>
<year>1966</year>
</movie>
<movie genre="comedy">
<title lang="en">The adventures of Earl</title>
<director>Sam Clover</director>
<year>1975</year>
<price>49.99</price>
</movie>
If we use the XPath expression //director, the output will be:

Select one:
a.
All director element text
b.
The first director on the XML document
c.
All director elements
d.
This will produce an error

Question 50
Incorrect
Mark 0.00 out of 1.00

Flag question
Question text
Which of the following statements about XML DOM is TRUE?

Select one:
a.
XML DOM stands for XML Data Object Manipulation
b.
XML DOM is not recommended by W3C
c.
XML DOM is platform independent
d.
XML DOM is used to get, update, add, and delete elements in a database

You might also like