
- 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.
Answer : A
Explaination
Yes! Using DOM parser, we can parse, modify or create a XML document.
Q 3 - Which of the following is true about JDOM Parser?
A - It is of low memory footprint.
Answer : C
Explaination
JDOM Parser is of low memory footprint and is nearly as fast as SAX.
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 - Which of the following is true about XPath?
A - XPath is an official recommendation of the World Wide Web Consortium (W3C).
B - It defines a language to find information in an XML file.
Answer : C
Explaination
XPath is an official recommendation of the World Wide Web Consortium (W3C).It defines a language to find information in an XML file.
Answer : A
Explaination
. selects the current node.
Q 7 - Which of the following method of DOM4J Parser gets all the attributes of an element?
Answer : C
Explaination
Node.valueOf(@Name) gets all the attributes of an element.
Answer : B
Explaination
In XML, custom tags can be created and used very easily.
Q 9 - What is a StAX Parser?
A - StAX is a JAVA based PULL API to parse XML document.
Answer : C
Explaination
StAX is a JAVA based PULL API to parse XML document. It is very quick API and uses streams.
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.