- 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 uses simple text format. It is human readable and understandable.
C - Using XSD, DTD and XML structure can be validated easily.
Answer : D
Explaination
All of the above options are correct.
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.
Answer : A
Explaination
Yes! Using JDOM parser, we can parse, modify or create a XML document.
Q 5 - XPath provides powerful path expressions select nodes or list of nodes in XML documents.
Answer : B
Explaination
XPath provides powerful path expressions select nodes or list of nodes in XML documents.
Q 6 - Which of the following XPath expression selects all student elements no matter where they are in the document?
Answer : D
Explaination
//student selects all student elements no matter where they are in the document.
Q 7 - Which of the following method of DOM4J Parser gets the XML node at particular index in the element?
Answer : C
Explaination
Element.node(index) gets the XML node at particular index in the element.
Answer : A
Explaination
Being plain text, XML is technology independent. It can be used by any technology for data storage and transmission purpose.
Answer : A
Explaination
StAX parser is a PULL API. It means in case of StAX parser, client application need to ask StAX parser to get information from XML whenever it needs.
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.