In the name of ALLAH, the most beneficient, the most merciful

Introduction to Web Services Development (CS311)

Multiple Choice Questions (MCQs)

Objective Questions

  1. CDATA is text that will NOT be parsed by a

    1. compiler
    2. parser
    3. interpreter
    4. human
  2. In DTD Empty elements are declared with the keyword ________.

    1. 'NULL
    2. IDLE
    3. EMPTY
    4. VOID
  3. In XML single quote is represented by ________ symbol.

    1. &apos
    2. &quot
    3. &gt
    4. &lt
  4. In the statement <img src="computer.gif" />, the name of attribute is:

    1. src
    2. img
    3. computer.gif
    4. None of the given
  5. ________ keyword indicates that attribute is optional.

    1. IMPLIED
    2. REQUIRED
    3. FIXED
    4. None of the given
  6. Following are important node properties except:

    1. nodeName
    2. nodeValue
    3. nodeType
    4. nodeAddress
  7. What does XML stand for?

    1. Extensible Markup Language
    2. X-Markup Language
    3. Example Markup Language
    4. eXtra Modem Link
  8. If the node type is ________ it is an element node.

    1. 0
    2. 1
    3. 2
    4. 3
  9. The operational speed of XML DOM, compared to SAX is:

    1. Faster
    2. Slower
    3. Equal
    4. None of the given
  10. When using properties or methods like childNodes or getElementByTagName(), a node list ________ is returned.

    1. Class
    2. Object
    3. Function
    4. Array
  11. Which one of the following is not an advantage of XML DOM?

    1. Language and Platform independent
    2. It is traversable
    3. It is modifiable
    4. Operational speed is slower than SAX
  12. replaceData() method has ________ parameters:

    1. 1
    2. 2
    3. 3
    4. 4
  13. Which one of the following languages used to access and manipulate methods and properties of objects?

    1. C++
    2. HTML
    3. XML
    4. JavaScript
  14. Use ________ keyword if you don't have an option for a default value but still want to force the attribute to be present.

    1. #IMPLIED
    2. #IMPLICIT
    3. #INFERRED
    4. #REQUIRED
  15. ________ provides methods for creating internal and external links within xml documents.

    1. XLink
    2. Xpath
    3. Xquery
    4. Xpointer
  16. Traversing means ________ through or traveling across the node tree.

    1. printing
    2. looping
    3. adding
    4. spinning
  17. <!ELEMENT note (message?)>
    The ? Sign in the example above declares that the child element "message" can occur ________ or ________ time inside the "note" element.

    1. one, two
    2. three, four
    3. Zero, one
    4. 100, 200
  18. What is output of the following XML statement?
    <b><i> XML </i></b>

    1. XML (bold only)
    2. XML (italic only)
    3. XML (bold and underline)
    4. XML (bold and italic)
  19. ________ is used for navigation in XML documents.

    1. XPointer
    2. XQuery
    3. XLink
    4. XPath
  20. Which of the following is the correct syntax to define the XML version?

    1. <xml version="1.0" />
    2. <?xml version="1.0"?>
    3. <?xml version="1.0" />
    4. None of the given
  21. Which of the following is used to get the value of an attribute?

    1. getAttribute()
    2. nodeValue
    3. getAttributeNode
    4. getElementByTagName()
  22. POST has ________ size limitations.

    1. 50 characters per request
    2. 100 characters per request
    3. 150 characters per request
    4. No size limitations
  23. Elements with only parsed character data are declared with ________ inside parentheses.

    1. ANY
    2. #PCDATA
    3. CDATA
    4. #DATA
  24. How can we make attributes have multiple values:

    1. attributes cannot have multiple values
    2. <myElement myAttribute="value1 value2" />
    3. <myElement myAttribute="value1" myAttribute="value2" />
    4. <myElement myAttribute="value1, value2" />
  25. PCDATA means:

    1. private character data
    2. parsed and compiled data
    3. parsed character data
    4. public character data
  26. The removeAttribute() method removes ________ by its name.

    1. Root node
    2. Attribute node
    3. Attribute value
    4. None of the given
  27. In XML the term PCDATA Stands for ________.

    1. Predefined Character Data
    2. Parsed Character Data
    3. Pure Character Data
    4. None of the given
  28. The attributes property of an element node returns a list of attribute nodes. This is called a named ________.

    1. array map
    2. node map
    3. node function
    4. function node
  29. Look at the following XML fragment:

    <bookstore> <book category="cooking">
    <title lang="en">Everyday Italian</title>
    <author>Glada De Laurentils>/author>
    <year>2005</year>
    <price>30.00</price>
    </book>
    </bookstore>

    In the XML above, the <title> element is the ________.

    1. last child of <book> element.
    2. first child of the <book> element.
    3. last child of <bookstore> element
    4. first child of the <bookstore> element
  30. Xpath is

    1. not belong to any Standard
    2. a Microsoft Standard
    3. not a W3C Standard
    4. a W3C Standard
  31. The entity reference &lt; represents ________ character.

    1. <
    2. >
    3. <=
    4. =>
  32. The term CDATA is used about ________ data that should not be parsed by the XML parser.

    1. audio
    2. text
    3. video
    4. Null
  33. The following statement returns all <title> elements under the ________.
    x.getElementsByTagName("title");

    1. x element
    2. Tag
    3. Name
    4. title
  34. Which of the following is correct syntax to write comments in XML document?

    1. <?-- comments here -->
    2. <!-- comments here --!>
    3. <!-- comments here -->
    4. </-- comments here -- >
  35. If the DTD is includedin your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax:

    1. <DOCTYPE root-element (element-declarations)>
    2. <DOCTYPE [element-declarations]>
    3. <DOCTYPE root-element [element-declarations]>
    4. <!DOCTYPE root-element [element-declarations]>
  36. An XML document is called well-formed document if

    1. it contains a root element
    2. it contains an element
    3. it contains one or more elements
    4. it must contain one or more elements and root element must contain all other elements
  37. Which parameter in replaceData() method tells the parser how many characters to replace?

    1. offset
    2. length
    3. string
    4. None of the given
  38. Which of the following is correct syntax to associate/link external DTD file in XML file?

    1. <!DOCTYPE SYSTEM "filename">
    2. <!DOCTYPE root-element SYSTEM "filename">
    3. <!DOCTYPE "filename">
    4. None of the given
  39. ________ is used to transform an XML document into another XML or HTML document.

    1. XSLT
    2. Xpath
    3. DTD
    4. XML Schema
  40. An XML document is called a valid document if

    1. the document has root element
    2. the document contains at least one or more root element
    3. the document has DTD associated with it & it compiles with that DTD
    4. each element must nest inside any enclosing element property
  41. Which of the following DTD statement indicates that an ELEMENT can contain any combination of parsable data?

    1. <!ELEMENT element-name EMPTY>
    2. <!ELEMENT element-name ANY>
    3. <!ELEMENT element-name (#PCDATA)>
    4. None of the given
  42. The DTD starts with

    1. <?DOCTYPE delimiter
    2. <!DOCTYPE delimiter
    3. []
    4. {}
  43. Which of the following is used to retrieve data from XML documents?

    1. XQuery
    2. XPath
    3. XLink
    4. XPointer
  44. Name conflicts in XML elements can easily be avoided using ________.

    1. name prefix
    2. xml schema
    3. empty elements
    4. entities
  45. For all XML documents, which of the following is true?

    1. All XML documents must have a DTD
    2. All XML elements must have a closing tag
    3. All XML elements must be in lower case
    4. None of the given
  46. Which one is used to add unique label to an element?

    1. Attribute
    2. DTD
    3. XLink
    4. XPointer
  47. ________ evaluates XML document as DOM structure.

    1. Compiler
    2. Interpreter
    3. Translator
    4. Parser
  48. Which of the following provides extra information about XML elements.

    1. Attributes
    2. Entities
    3. Tags
    4. None of the given