XML Final Exam
XML Final Exam
Correct
Mark 1.00 out of 1.00
Flag question
Question text
The following are nodes in XML DOM except for
Select one:
a.
Text
b.
Number
c.
Attribute
d.
Comment
Question 2
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.
XML Parser
b.
DTD
c.
Namespaces
d.
XML Schema
Question 3
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
Which of the following is the correct description of XPath?
Select one:
a.
This is a format for delivering dynamic content in the internet
b.
This technology takes an XML file and converts it into other format.
c.
This is a combination of both HTML and XML.
d.
This is the syntax for defining parts of an XML document as well as to extract information on it.
Question 4
Correct
Mark 1.00 out of 1.00
Remove flag
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.
This will produce an error
b.
All movies with genre equals to drama
c.
All movies
d.
All movie who's genre is not drama
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
Suppose we want to change a node called "oldnode" to a new node called "newnode". We can use
the XML function
Select one:
a.
xmlDoc.documentElement.exchangeChild(newNode,oldNode);
b.
xmlDoc.documentElement.replaceChild(newNode,oldNode);
c.
xmlDoc.documentElement.assignChild(newNode,oldNode);
d.
xmlDoc.documentElement.changeChild(newNode,oldNode);
Question 6
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
Which of the following about XML Schema is NOT TRUE?
Select one:
a.
XML Schema is used to create a well-defined XML document
b.
All of the choices
c.
XML Schema uses a unique syntax
d.
XML Schema does not allow the use of namespaces
Question 7
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 the XML DOM function xmlDoc.getElementsByTagName("director").length is executed, it will
return
Select one:
a.
4
b.
7
c.
5
d.
6
Question 8
Correct
Mark 1.00 out of 1.00
Flag question
Question text
These are special set of rules are that a well-formed XML document should abide to be considered a
valid document.
Select one:
a.
None of the choices
b.
XPath
c.
Namespace
d.
Document Definition
Question 9
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
This XPath expression Selects the parent of the current node.
Select one:
a.
descendant
b.
ancestor
c.
child
d.
parent
Question 10
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
This is a technology well-known for its "asynchronous" nature. It can communicate, exchange data,
and update the page of the server without having to refresh the page.
Select one:
a.
AJAX
b.
XSLT
c.
XPath
d.
RSS
Question 11
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
Which of the following about XML DTD is TRUE?
Select one:
a.
It is used to make sure the XML code is in the proper format.
b.
All of the choices
c.
With a DTD, independent groups of people can agree on a standard for interchanging data
d.
By incorporating XML DTD in XML documents, errors can be found easily.
Question 12
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
What does XML stands for?
Select one:
a.
X-Markup Language
b.
Extra Markup Language
c.
Extensive Markup Language
d.
Extreme Markup Language
Question 13
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
This is a type of XML database that is based on the container rather than table format.
Select one:
a.
XML-enabled database
b.
Native XML database
c.
XQuery
d.
XPath
Question 14
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
To add a created element/tag on our XML document we use the XML DOM function ________.
Select one:
a.
createElement()
b.
replaceChild()
c.
getElementsByTagName()
d.
appendChild()
Question 15
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
To match the root node in XSLT transform the syntax will be
Select one:
a.
<xsl:template match=” /” >
b.
. <xsl:template match=”RootNode”>
c.
<xsl:template match=”Document”>
d.
<xsl:template match=”Root”>
Question 16
Incorrect
Mark 0.00 out of 1.00
Remove flag
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 17
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
XML document definition has two types. XML DTD and ______.
Select one:
a.
XML Namespace
b.
XML Schema
c.
XML XPath
d.
XML Vaidation
Question 18
Incorrect
Mark 0.00 out of 1.00
Remove flag
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.
The XML declaration should be the on the very first line of the document.
d.
XML declaration should have closing tag.
Question 19
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
To declare an internal DTD, which of the following elements is used?
Select one:
a.
"UTF-8" standalone
b.
c.
d.
e.
"no" ?>
f.
"1.0" encoding
g.
Question 20
Correct
Mark 1.00 out of 1.00
Remove flag
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.
All title elements
c.
All title element text
d.
The first title element on the XML document
Question 21
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
Which of the following is the attribute is used to define a new XML Namespace?
Select one:
a.
xmlnamespace
b.
xmlns
c.
xmlnpc
d.
xmlnmspc
Question 22
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
Given the XML document:
<movie>
<title>The House</title>
<director>Ben Crows</director>
<year>1997</year>
</movie>
How can we change the text "Ben Crows" to "Sam Raimi"?
Select one:
a.
xmlDoc.getElementsByTagName("director")[0].childNodes[0] = "Sam Raimi";
b.
xmlDoc.getElementsByTagName("Ben Crows")[0].childNodes[0].nodeValue = "Sam Raimi";
c.
xmlDoc.getElementsByTagName("director")[0]. nodeValue = "Sam Raimi";
d.
xmlDoc.getElementsByTagName("director")[0].childNodes[0].nodeValue = "Sam Raimi";
Question 23
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
In declaring XSLT, we can use the tag __________
Select one:
a.
xsl:declaration>
b.
c.
d.
Question 24
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
Given the XML document below:
<movie>
<title>The House</title>
<director>Ben Crows</director>
<year>1997</year>
</movie>
Which of the following is the correct XML DOM function to extract the text "1997"?
Select one:
a.
None of the choices
b.
xmlDoc.getElementsByTagName("year").[1]childNodes[0].nodeValue;
c.
xmlDoc.getElementsByTagName("year").[0]childNodes[0];
d.
xmlDoc.getElementsByTagName("year").[0]childNodes[0].nodeValue;
Question 25
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
Which of the following is a valid XPath expression?
Select one:
a.
;;
b.
//
c.
.,
d.
((
Question 26
Incorrect
Mark 0.00 out of 1.00
Remove flag
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.
DTD
b.
XML Schema
c.
XPath
d.
XSLT
Question 27
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
To remove a specified child node, we use the XML DOM function
Select one:
a.
removeChild()
b.
removeAttribute()
c.
replaceElement()
d.
replaceAttribute()
Question 28
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
Which of the following statement is INCORRECT
Select one:
a.
XML tags/elements are predefined
b.
XML stands for extensive Markup Language
c.
XML is different from HTML
d.
XML can be viewed using a browser
Question 29
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
Which following applications can be used to view XML document?
Select one:
a.
Mozilla Firefox
b.
All of the choices
c.
Google Chrome
d.
None of the choices
Question 30
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
XPath is a language for finding information in an :
Select one:
a.
XML Document
b.
XHTML Document
c.
XSL Document
d.
XQuery Document
Question 31
Incorrect
Mark 0.00 out of 1.00
Remove flag
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 put a conditional test against the content of the XML file.
c.
This element is used to sort the output.
d.
This element is used to build templates.
Question 32
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
Which of the following is a correct namespace declaration?
Select one:
a.
<table:g="www.amaonline.com.ph">
b.
<g:table xmln ="www.amaonline.com.ph">
c.
< xmlns:g="www.amaonline.com.ph">
d.
<g:table xmlns:g="www.amaonline.com.ph">
Question 33
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
Which of the following is the correct description of XHTML?
Select one:
a.
This is a format for delivering dynamic content in the internet
b.
This is a combination of both HTML and XML.
c.
This is the syntax for defining parts of an XML document as well as to extract information on it.
d.
This technology takes an XML file and converts it into other format.
Question 34
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
This element is used to express multiple conditional tests.
Select one:
a.
<xsl:value-of>
b.
<xsl:choose>
c.
<xsl:sort>
d.
<xsl:template>
Question 35
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
Which of the following describes an XML Processing Instruction?
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 36
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
In XML Schema, this is a container for other element definitions.
Select one:
a.
Elements
b.
Simple Type
c.
Complex Type
d.
Attributes
Question 37
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
Comments in XML is given using the syntax:
Select one:
a.
<!----->
b.
</-- --->
c.
<!-----!>
d.
<?----->
Question 38
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
DTD includes the specifications about the markup that can be used within the document, the
specifications consists of all EXCEPT
Select one:
a.
entity declarations
b.
the browser name
c.
element declarations
d.
the size of element name
Question 39
Correct
Mark 1.00 out of 1.00
Remove flag
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 title element texts?
Select one:
a.
/cinema/movie/title/text
b.
/cinema/movie/text()
c.
/cinema/movie/title/text()
d.
/cinema/movie/title
Question 40
Correct
Mark 1.00 out of 1.00
Remove flag
Question text
This is a type of XML database that provides for the conversion of database into XML document.
Select one:
a.
Native XML database
b.
XQuery
c.
XPath
d.
XML-enabled database
Question 41
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
Which of the following is a valid tag name for an XML Document?
Select one:
a.
xml
b.
xmlMyTag
c.
my_tag
d.
3myTag
Question 42
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
This is an XML DOM element that gets or sets the HTML content of the given tag
Select one:
a.
setAttribute()
b.
removeAttribute()
c.
innerHTML
d.
getAttribute()
Question 43
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
This is a DTD found outside an XML document.
Select one:
a.
Internal DTD
b.
DTD
c.
External DTD
d.
!DOCTYPE
Question 44
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
This is an XML related technology that transforms an XML document into another kind of format.
Select one:
a.
XHTML
b.
XSLT
c.
XPath
d.
RSS
Question 45
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
Which of the following describes an XML element/tag?
Select one:
a.
These are considered as a foundation of an XML document.
b.
This is an XML component contains details that set up an XML processor in parsing the document.
c.
This is a way for XML to send special instructions to the XML Parser.
d.
his XML component shortens XML documents.
Question 46
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
In the tree structure below
Select one:
a.
<title>, <composer>, and <genre>
b.
<song> and <title>
c.
<song>, <title>, and "Long Song"
d.
<compose>, <genre>, <song> and <title>
Question 47
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
A schema describes
(i) grammer
(ii) vocabulary
(iii) structure
(iv) datatype of XML document
Select one:
a.
(i),(ii),(iv) are correct
b.
(i) & (ii) are correct
c.
(i),(iii) ,(iv) are correct
d.
(i),(ii),(iii),(iv) are correct
Question 48
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
Which of the following describes an XML Entities?
Select one:
a.
These are considered as a foundation of an XML document.
b.
This XML component shortens XML documents.
c.
This is an XML component contains details that set up an XML processor in parsing the document.
d.
This is a way for XML to send special instructions to the XML Parser.
Question 49
Incorrect
Mark 0.00 out of 1.00
Remove flag
Question text
What is the role of the XPath language in XSL processing?
Select one:
a.
XPath identifies the order or path of processing to be followed as the XSL language is processed
b.
XPath identifies the path to be followed in the execution of XSL translation prescriptions
c.
XPath specifies which XSL transform files are to be used in the translation of XML
d.
XPath identifies locations in XML data to be transformed in the source tree and the locations to be
generated in output tree specified in XSL translation prescriptions
Question 50
Incorrect
Mark 0.00 out of 1.00
Remove flag
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.
/cinema/director
b.
/cinema/movie/director
c.
director
d.
/movie/director