XML Questions: Trivia Quiz!

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Ghanshyam
G
Ghanshyam
Community Contributor
Quizzes Created: 1 | Total Attempts: 228
| Attempts: 228 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. Which are the main features of XML?

Explanation

The main features of XML include text data description, a human- and computer-friendly format, and the ability to handle data in a tree structure with one-and only one-root element. All of these features are mentioned above, making the answer "All mentioned above" correct.

Submit
Please wait...
About This Quiz
XML Questions: Trivia Quiz! - Quiz

Dive into the essentials of XML with this trivia quiz! Assess your knowledge on well-formed XML documents, XML declarations, DTD usage, and regular expressions. Perfect for learners looking... see moreto understand XML usage in web development. see less

2. What is the constraint on the data per cookie?

Explanation

The constraint on the data per cookie is 4 KB. This means that the maximum amount of data that can be stored in a single cookie is 4 kilobytes.

Submit
3. 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.

Explanation

The correct matching is 1-r, 2-s, 3-p, 4-q. The pattern [^...] matches any single character not in the brackets, so it matches the non-word characters. The pattern [...] matches any single character in the brackets, so it matches the non-digits. The pattern \W matches any single character that is not a word character, so it matches the non-word characters. The pattern \D matches any single character that is not a digit, so it matches the non-digits.

Submit
4. Which option is true about session scope?

Explanation

Session scope refers to the lifespan of an object in a web application. When an object is stored in session scope, it is accessible only from the pages that are in the same session. This means that the object can be accessed and manipulated by any page within the same session, but not by pages in different sessions. This allows for the sharing of data and information between multiple pages within a single session, providing a way to maintain state and pass data between different parts of an application.

Submit
5. Attribute standalone="no" should be included in XML declaration if a document:

Explanation

The attribute standalone="no" should be included in the XML declaration if the document has an external DTD. This attribute is used to indicate whether the document relies on an external DTD or not. By including standalone="no", it signifies that the document is not self-contained and requires the presence of the external DTD for proper validation and interpretation.

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

Explanation

The correct answer is session_start(). This function is used to start a session in PHP. It initializes the session data and assigns a unique session ID to the user. Once the session is started, you can store and retrieve data in the session variables throughout the user's browsing session.

Submit
7. "request" is instance of which one of the following classes?

Explanation

The correct answer is HttpServletRequest. The reason is that HttpServletRequest is a class in Java that represents an HTTP request made by a client to a server. It provides methods to access information such as parameters, headers, and cookies of the request. Therefore, "request" is an instance of the HttpServletRequest class.

Submit
8. To use the external DTD we have the syntax:

Explanation

The correct answer is "". This is the correct syntax for using an external DTD in an XML document. The "DOCTYPE" declaration specifies the type of document and the location of the DTD file. In this case, the DTD file is named "order.dtd" and it is located in the same directory as the XML document. The "SYSTEM" keyword is used to indicate that the DTD file is an external file. The "standalone" attribute is set to "no" to indicate that the document depends on the external DTD for its structure and validation.

Submit
9. Which of the following XML documents are well-formed?

Explanation

The given XML document is well-formed because it follows the rules of XML syntax. It has a root element, , which is properly closed with . It also has a nested element, , which is also properly closed with . The text content is placed within the elements, and there are no syntax errors or inconsistencies in the document.

Submit
10. 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

Explanation

The correct answer is "pattern.test(text)" because the test() method is used to check if a pattern matches a string. In this case, the pattern is /\d+/g which matches one or more digits, and the string is "testing: 1, 2, 3". So, by using the test() method on the pattern with the string as the argument, we can determine if the pattern matches the string.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 22, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Nov 20, 2018
    Quiz Created by
    Ghanshyam
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which are the main features of XML?
What is the constraint on the data per cookie?
Match the following. ...
Which option is true about session scope?
Attribute standalone="no" should be included in XML...
Which one of the following function is used to start a session?
"request" is instance of which one of the following classes?
To use the external DTD we have the syntax:
Which of the following XML documents are well-formed?
Consider the following statement containing regular expressions ...
Alert!

Advertisement