XML Questions: Trivia Quiz!

10 Questions | Total Attempts: 128

SettingsSettingsSettings
Please wait...
XML Questions: Trivia Quiz!

.


Questions and Answers
  • 1. 
    Which of the following XML documents are well-formed?
    • A. 

      <firstElement>some text goes here <secondElement>another text goes here</secondElement> </firstElement>  

    • B. 

      <firstElement>some text goes here</firstElement> <secondElement> another text goes here</secondElement>  

    • C. 

      <firstElement>some text goes here <secondElement> another text goes here</firstElement> </secondElement>

    • D. 

      </firstElement>some text goes here </secondElement>another text goes here <firstElement>

  • 2. 
    Attribute standalone="no" should be included in XML declaration if a document:
    • A. 

      Has processing instructions

    • B. 

      Is linked to an external XSL stylesheet

    • C. 

      Has external general references

    • D. 

      Has an external DTD

  • 3. 
    To use the external DTD we have the syntax:
    • A. 

      <?xml version=”A.0” standalone=”no”?> <! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>  

    • B. 

      <?xml version=”A.0” standalone=”yes”?> <! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>

    • C. 

      <?xml version=”A.0” standalone=”no”?> <! DOCTYPE DOCUMENT “order.dtd”?>

    • D. 

      <?xml version=”A.0” standalone=”yes”?> <! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>

  • 4. 
    Which option is true about session scope?
    • A. 

      Objects are accessible only from the page in which they are created

    • B. 

      Objects are accessible only from the pages which are in same session

    • C. 

      Objects are accessible only from the pages which are processing the same request

    • D. 

      Objects are accessible only from the pages which reside in same application

  • 5. 
    Consider the following statement containing regular expressions var text = "testing: 1, 2, 3"; var pattern = /\d+/g; In order to check if the pattern matches, the statement is
    • A. 

      Text==pattern

    • B. 

      Text.equals(pattern)

    • C. 

      Text.test(pattern)

    • D. 

      Pattern.test(text)

  • 6. 
    Which one of the following function is used to start a session?
    • A. 

      Start_session()

    • B. 

      Session_start()

    • C. 

      Session_begin()

    • D. 

      Begin_session()

  • 7. 
    What is the constraint on the data per cookie?
    • A. 

      2 KB

    • B. 

      1 KB

    • C. 

      4 KB

    • D. 

      3 KB

  • 8. 
    “request” is instance of which one of the following classes?
    • A. 

      Request

    • B. 

      HttpRequest

    • C. 

      HttpServletRequest

    • D. 

      ServletRequest

  • 9. 
    Match the following.
    1. [^...]                         p. Matches the non-word characters.
    2. [...]                            q. Matches the non-digits.
    3. \W                               r. Matches any single character not in brackets.
    4. \D                               s.  Matches any single character in brackets.
    • A. 

      1-r 2-p 3-q 4-s

    • B. 

      1-r 2-s 3-p 4-q

    • C. 

      1-q 2-s 3-r 4-p

    • D. 

      1-p 2-r 3-s 4-q

  • 10. 
    Which are the main features of XML?
    • A. 

      Text data description

    • B. 

      Human- and computer-friendly format

    • C. 

      Handles data in a tree structure having one-and only one-root element

    • D. 

      All mentioned above