wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

IT 310 - MIDTERM EXAMINATION

Total questions: 50

Worksheet time: 4hrs 10mins

Name
Class
Date
1.

XML stands for:

a)

Extensive Markup Language

b)

Extended Makeup Language

c)

Extensible Markup Language

d)

Extensive Makeup Language

2.

<?xml version="1.0"?>

<contactInfo>

<name>Jandell</name>

<address>Plaridel, Bulacan</address>

</contactInfo>


Which of the following is the character data?

a)

<contactInfo>, <name>, <address>

b)

Jandell, Plaridel, Bulacan

c)

xml version

d)

1.0

3.

Which of the following is the root element?

a)

sNO

b)

students

c)

student

d)

name

4.

Which of the following are the values of the attribute?

a)

19-1507-298, 19-1507-300

b)

1st sNO, 2nd sNO

c)

student

d)

students

5.

XML declaration is case sensitive and shall start with “<?xml ” and ends with “?>” where xml is written in lowercase.

a)

True

b)

False

c)

Maybe

d)

Not Given

6.

A multi-root element XML document is possible.

a)

True

b)

False

c)

Maybe

d)

Not Given

7.

XML attribute can have two values in a syntax.

a)

True

b)

False

c)

Maybe

d)

Not Given

8.

The following is the output of writing the "&quot;" entity:

a)

apostrophe

b)

greater than

c)

less than

d)

quotation mark

9.

The following is the output of writing the "&gt;" entity:

a)

apostrophe

b)

greater than

c)

less than

d)

quotation mark

10.

An XML comment always starts with !-- and ends with --!.

a)

True

b)

False

c)

Maybe

d)

Not given

11.

Comments may appear anywhere in a document.

a)

True

b)

False

c)

Maybe

d)

Not given

12.

Which of the following syntax about linking XML documents with CSS is CORRECT?

a)

<xml-stylesheet type="text/css" href=“cssFileName.css">

b)

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

c)

<?stylesheet type="text/css" href=“cssFileName.css"?>

d)

<?xml-stylesheet type="text/css" href=“cssFileName"?>

13.

The DOM represents the document as:

a)

objects and nodes

b)

API and nodes

c)

Documents and objects

d)

W3C and WWW

14.

DOM stands for:

a)

Data Object Model

b)

Document Operation Model

c)

Document Object Model

d)

Document Object Modes

15.

Each XML element is an:

a)

text nodes

b)

document node

c)

element node

d)

comment node

16.

The whole document is a:

a)

text nodes

b)

document node

c)

element node

d)

comment node

17.

These are text stored in XML elements:

a)

text nodes

b)

document node

c)

element node

d)

comment node

18.

Which element is the parent element of <address>?

a)

students

b)

student

c)

name

d)

Not given

19.

Which are the attribute nodes?

a)

students

b)

student

c)

name

d)

Not given

20.

Which are the first child of <students>?

a)

students

b)

student

c)

course

d)

Not given

21.

Which are the last child of <students>?

a)

students

b)

student

c)

course

d)

Not given

22.

Which of the following statements about accessing DOM nodes is NOT correct?

a)

getElementsByTagName() method allows the retrieval of elements with the specified class.

b)

getElementById() method allows the selection of one specific element with the specified id.

c)

getAttribute() method gets an attribute value by name.

d)

All of the Above

23.

The getElementsByTagName() method returns an array.

a)

True

b)

False

c)

Maybe

d)

Not given

24.

XML DOM can be done using different languages except:

a)

JavaScript

b)

PHP

c)

Python

d)

Not given

25.

Which element is the last child of <student>

a)

birthday

b)

studentNo

c)

course

d)

Not given

26.

When dealing with XML DOM, your JavaScript codes could be internal or external.

a)

True

b)

False

c)

Maybe

d)

Not given

27.

Which JS DOM events is recommended to use on body tag to manipulate XML data.

a)

Onclick

b)

Onload

c)

OnHover

d)

Onchange

28.

Which of the following statements about NextSibling Property is CORRECT?

a)

returns the next element sibling of an element.

b)

returns the next sibling of an element, either if it is an element node or a text node.

c)

property returns the previous element sibling of an element.

d)

returns the children of an element.

29.

Which of the following statements about previousElementSibling Property is CORRECT?

a)

property returns the next element sibling of an element.

b)

returns the next sibling of an element, either if it is an element node or a text node.

c)

property returns the previous element sibling of an element.

d)

returns the children of an element.

30.

Which of the following statements about nextElementSibling Property is CORRECT?

a)

property returns the next element sibling of an element.

b)

returns the next sibling of an element, either if it is an element node or a text node.

c)

property returns the previous element sibling of an element.

d)

returns the children of an element.

31.

Which of these are not the valid XML DOM relationships ?

a)

parentNode

b)

previousSibling

c)

lastChild

d)

nextNode

32.

XML DOM defines a standard way for:

a)

only accessing the XML documents

b)

accessing and manipulating XML documents

c)

only manipulating XML documents

d)

None of these

33.

The DOM treats the XML document as:

a)

table-structure

b)

file-structure

c)

tree-structure

d)

All the above

34.

This method creates the new element node.

a)

buildElement()

b)

createElement()

c)

Element()

d)

None of these

35.

What is the correct syntax of the declaration which defines the XML version?

a)

<?xml version="1.0"?>

b)

<xml version="1.0"/>

c)

<?xml version="1.0"/>

d)

</xml version="1.0"/>

36.

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>

a)

Yes

b)

No

37.

To get the value stored in XML elements, the correct way to access is:

a)

Text Node -> Node Value -> Element Node

b)

Element Node -> Text Node -> Node Value

c)

Element Node -> Text Node -> Node Value

d)

Node Value -> Text Node -> Element Node

38.

What is the value of the nodeType property that returns 2?

a)

Text

b)

Attribute

c)

Element

d)

Entity

39.

What is the value of the nodeType property that returns 1?

a)

Text

b)

Attribute

c)

Element

d)

Entity

40.

A Markup Language Manipulation class available only in PHP.

a)

Load()

b)

formatOutput

c)

DOMDocument()

d)

preserveWhiteSpace

41.

This method is used to determine which file needs to be parsed.

a)

Load()

b)

formatOutput

c)

DOMDocument()

d)

preserveWhiteSpace

42.

Which of the following statements about nodeValue Property is CORRECT?

a)

gets all elements with the specified tag name.

b)

returns the selection of a specific value using index to an array

c)

returns the stored value in an element.

d)

allows the retrieval of the stored value in the specified attribute.

43.

Which of the following statements about item() method is CORRECT?

a)

gets all elements with the specified tag name.

b)

returns the selection of a specific value using index to an array

c)

returns the stored value in an element.

d)

allows the retrieval of the stored value in the specified attribute.

44.

The appendChild() method adds the element's first child.

a)

True

b)

False

45.

When using superglobal variables, which of the following is recommended?

a)

POST

b)

GET

c)

SESSION

d)

ALL OF THE ABOVE

46.

This method can be used to remove the specified node.

a)

removeChild()

b)

deleteChild()

c)

dropChild()

d)

None of these

47.

Each attribute,element and text in the XML document represents a:

a)

node in a tree

b)

stumb in a tree

c)

leaf in a tree

d)

flowers in a tree

48.

How many parameter/s are there for removeChild() method ?

a)

0

b)

1

c)

2

d)

3

49.

How many parameter/s are there for replaceChild() method ?

a)

0

b)

1

c)

2

d)

3

50.

How many parameter/s are there for appendChild() method ?

a)

0

b)

1

c)

2

d)

3