- 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 parses the document on event based triggers and does not load the complete document into the memory?
Answer : B
Explaination
SAX Parser parses the document on event based triggers and does not load the complete document into the memory.
Q 2 - Which of the following is true about SAX parsing?
C - The application program provides an 'event' handler that must be registered with the parser.
Answer : D
Explaination
All of the above are true.
Q 3 - Which of the following method get called when document begins in SAX parsing?
Answer : A
Explaination
startDocument() method is called at the beginning of a document.
Q 4 - Which method of JDOM Parser builds the JDOM document from the xml source?
Answer : A
Explaination
SAXBuilder.build(xmlSource) builds the JDOM document from the xml source.
Q 5 - XPath uses a path expression to select node or list of nodes from an xml document.
Answer : A
Explaination
XPath uses a path expression to select node or list of nodes from an xml document.
Q 6 - Which of the following is true about DOM4J Parser?
A - DOM4J is an open source, java based library to parse XML document.
B - It is highly flexible, high-performance, and memory-efficient API.
Answer : C
Explaination
DOM4J is an open source, java based library to parse XML document. It is highly flexible, high-performance, and memory-efficient API.
Q 7 - Which of the following is true about Element 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 : B
Explaination
Element Class represents an XML element. Element object has methods to manipulate its child elements,its text, attributes and namespaces.
Q 8 - When to use a DOM Parser?
A - You need to know a lot about the structure of a document.
B - You need to move parts of the document around.
C - You need to use the information in the document more than once.
Answer : D
Explaination
In all of the above situations, DOM parsing is preferred.
Answer : A
Explaination
Yes! Using StAX parser, we can parse, modify and create a XML document.
Answer : A
Explaination
Yes! Using StAX parser, we can parse, modify and even create a XML document.