NEW
Font size
WorksheetsIT 310 - MIDTERM EXAMINATION
Total questions: 50
Worksheet time: 4hrs 10mins
XML stands for:
Extensive Markup Language
Extended Makeup Language
Extensible Markup Language
Extensive Makeup Language
<?xml version="1.0"?>
<contactInfo>
<name>Jandell</name>
<address>Plaridel, Bulacan</address>
</contactInfo>
Which of the following is the character data?
<contactInfo>, <name>, <address>
Jandell, Plaridel, Bulacan
xml version
1.0
Which of the following is the root element?
sNO
students
student
name
Which of the following are the values of the attribute?
19-1507-298, 19-1507-300
1st sNO, 2nd sNO
student
students
XML declaration is case sensitive and shall start with “<?xml ” and ends with “?>” where xml is written in lowercase.
True
False
Maybe
Not Given
A multi-root element XML document is possible.
True
False
Maybe
Not Given
XML attribute can have two values in a syntax.
True
False
Maybe
Not Given
The following is the output of writing the """ entity:
apostrophe
greater than
less than
quotation mark
The following is the output of writing the ">" entity:
apostrophe
greater than
less than
quotation mark
An XML comment always starts with !-- and ends with --!.
True
False
Maybe
Not given
Comments may appear anywhere in a document.
True
False
Maybe
Not given
Which of the following syntax about linking XML documents with CSS is CORRECT?
<xml-stylesheet type="text/css" href=“cssFileName.css">
<?xml-stylesheet type="text/css" href=“cssFileName.css"?>
<?stylesheet type="text/css" href=“cssFileName.css"?>
<?xml-stylesheet type="text/css" href=“cssFileName"?>
The DOM represents the document as:
objects and nodes
API and nodes
Documents and objects
W3C and WWW
DOM stands for:
Data Object Model
Document Operation Model
Document Object Model
Document Object Modes
Each XML element is an:
text nodes
document node
element node
comment node
The whole document is a:
text nodes
document node
element node
comment node
These are text stored in XML elements:
text nodes
document node
element node
comment node
Which element is the parent element of <address>?
students
student
name
Not given
Which are the attribute nodes?
students
student
name
Not given
Which are the first child of <students>?
students
student
course
Not given
Which are the last child of <students>?
students
student
course
Not given
Which of the following statements about accessing DOM nodes is NOT correct?
getElementsByTagName() method allows the retrieval of elements with the specified class.
getElementById() method allows the selection of one specific element with the specified id.
getAttribute() method gets an attribute value by name.
All of the Above
The getElementsByTagName() method returns an array.
True
False
Maybe
Not given
XML DOM can be done using different languages except:
JavaScript
PHP
Python
Not given
Which element is the last child of <student>
birthday
studentNo
course
Not given
When dealing with XML DOM, your JavaScript codes could be internal or external.
True
False
Maybe
Not given
Which JS DOM events is recommended to use on body tag to manipulate XML data.
Onclick
Onload
OnHover
Onchange
Which of the following statements about NextSibling Property is CORRECT?
returns the next element sibling of an element.
returns the next sibling of an element, either if it is an element node or a text node.
property returns the previous element sibling of an element.
returns the children of an element.
Which of the following statements about previousElementSibling Property is CORRECT?
property returns the next element sibling of an element.
returns the next sibling of an element, either if it is an element node or a text node.
property returns the previous element sibling of an element.
returns the children of an element.
Which of the following statements about nextElementSibling Property is CORRECT?
property returns the next element sibling of an element.
returns the next sibling of an element, either if it is an element node or a text node.
property returns the previous element sibling of an element.
returns the children of an element.
Which of these are not the valid XML DOM relationships ?
parentNode
previousSibling
lastChild
nextNode
XML DOM defines a standard way for:
only accessing the XML documents
accessing and manipulating XML documents
only manipulating XML documents
None of these
The DOM treats the XML document as:
table-structure
file-structure
tree-structure
All the above
This method creates the new element node.
buildElement()
createElement()
Element()
None of these
What is the correct syntax of the declaration which defines the XML version?
<?xml version="1.0"?>
<xml version="1.0"/>
<?xml version="1.0"/>
</xml version="1.0"/>
Is this a "well formed" XML document?
<?xml version="1.0"?>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
Yes
No
To get the value stored in XML elements, the correct way to access is:
Text Node -> Node Value -> Element Node
Element Node -> Text Node -> Node Value
Element Node -> Text Node -> Node Value
Node Value -> Text Node -> Element Node
What is the value of the nodeType property that returns 2?
Text
Attribute
Element
Entity
What is the value of the nodeType property that returns 1?
Text
Attribute
Element
Entity
A Markup Language Manipulation class available only in PHP.
Load()
formatOutput
DOMDocument()
preserveWhiteSpace
This method is used to determine which file needs to be parsed.
Load()
formatOutput
DOMDocument()
preserveWhiteSpace
Which of the following statements about nodeValue Property is CORRECT?
gets all elements with the specified tag name.
returns the selection of a specific value using index to an array
returns the stored value in an element.
allows the retrieval of the stored value in the specified attribute.
Which of the following statements about item() method is CORRECT?
gets all elements with the specified tag name.
returns the selection of a specific value using index to an array
returns the stored value in an element.
allows the retrieval of the stored value in the specified attribute.
The appendChild() method adds the element's first child.
True
False
When using superglobal variables, which of the following is recommended?
POST
GET
SESSION
ALL OF THE ABOVE
This method can be used to remove the specified node.
removeChild()
deleteChild()
dropChild()
None of these
Each attribute,element and text in the XML document represents a:
node in a tree
stumb in a tree
leaf in a tree
flowers in a tree
How many parameter/s are there for removeChild() method ?
0
1
2
3
How many parameter/s are there for replaceChild() method ?
0
1
2
3
How many parameter/s are there for appendChild() method ?
0
1
2
3
