- Java XML Home
- Java XML Overview
- Java XML Parsers
- Java DOM Parser
- Java DOM Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java SAX Parser
- Java SAX Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- JDOM XML Parser
- JDOM XML Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java StAX Parser
- Java StAX Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java XPath Parser
- Java XPath Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java DOM4J Parser
- Java DOM4J Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java XML Useful Resources
- Java XML - Questions and Answers
- Java XML - Quick Guide
- Java XML - Useful Resources
- Java XML - Discussion
Java XML Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Java XML Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following is true about XML?
B - XML is a tag based language like HTML.
Answer : D
Explaination
All of the above options are correct.
Q 2 - Which of the following component represent actual content of an element or attribute in DOM Parsing?
Answer : A
Explaination
Text represents the actual content of an Element or Attr.
Answer : B
Explaination
No! Using SAX parser, we can only parse or modify a XML document.
Q 4 - Which method of JDOM Parser gets the root element of the XML?
Answer : B
Explaination
Document.getRootElement() get the root element of the XML.
Q 5 - XPath is one of the major element in XSLT standard and is must have knowledge in order to work with XSLT documents.
Answer : B
Explaination
XPath is one of the major element in XSLT standard and is must have knowledge in order to work with XSLT documents.
Q 6 - Which of the following is true about DOM4J Parser?
A - DOM4J is java optimized and uses java collection like List and Arrays.
B - It works with DOM, SAX, XPath and XSLT.
C - It can parse large XML document with very low memory footprint.
Answer : D
Explaination
DOM4J is java optimized, it uses java collection like List and Arrays. It works with DOM, SAX, XPath and XSLT. It can parse large XML document with very low memory footprint.
Q 7 - Which of the following is true about Node Class of DOM4J Parser?
A - It represents the entire XML document. A Document object is often referred to as a DOM tree.
C - It represents Element, Attribute or ProcessingInstruction.
Answer : C
Explaination
Node Class represents Element, Attribute or ProcessingInstruction.
Q 8 - When to use a SAX Parser?
A - You can process the XML document in a linear fashion from the top down.
B - You are processing a very large XML document whose DOM tree would consume too much memory.
C - The problem to be solved involves only part of the XML document
Answer : D
Explaination
In all of the above situations, SAX parsing is preferred.
Q 9 - When to use a JDOM Parser?
A - You need to know a lot about the structure of a document.
Answer : C
Explaination
In both of the above situations, JDOM parser is preferred.
Q 10 - When to use a StAX Parser?
A - You are processing a very large XML document whose DOM tree would consume too much memory.
Answer : C
Explaination
In both of the above situations, StAX parser is preferred.