
- Java XML Tutorial
- 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
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 by loading the complete contents of the document and creating its complete hiearchical tree in memory?
Answer : A
Explaination
Dom Parser parses the document by loading the complete contents of the document and creating its complete hiearchical tree in memory.
Q 2 - Which of the following is true about SAX parsing?
A - SAX is an event-based parser for xml documents.
B - Unlike a DOM parser, a SAX parser creates no parse tree.
Answer : C
Explaination
SAX (the Simple API for XML) is an event-based parser for xml documents.Unlike a DOM parser, a SAX parser creates no parse tree.
Q 3 - Which component of JDOM Parser represents XML Element?
Answer : B
Explaination
Element represents an XML element. Element object has methods to manipulate its child elements,its text, attributes and namespaces.
Q 4 - Which of the following class of StAX parser provide iterator of events which can be used to iterate over events as they occur while parsing the XML document?
Answer : A
Explaination
XMLEventReader provide iterator of events which can be used to iterate over events as they occur while parsing the XML document.
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 method of DOM4J Parser gets the root element of the XML?
Answer : C
Explaination
Document.getRootElement() gets the root element of the XML.
Q 8 - What is XML Parsing?
Answer : A
Explaination
Parsing XML refers to going through XML document to access data or to modify data in one or other way.
Q 9 - When to use a JDOM Parser?
A - You need to use the information in the document more than once.
B - You are a java developer and want to leverage java optimized parsing of XML.
Answer : C
Explaination
In both of the above situations, JDOM parser is preferred.
Q 10 - When to use a StAX Parser?
A - You can process the XML document in a linear fashion from the top down.
Answer : C
Explaination
In both of the above situations, StAX parser is preferred.