- 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 - What SAX stands for?
Answer : B
Explaination
SAX stands for Simple API for XML.
Q 3 - Which component of JDOM Parser represents DOM tree?
Answer : A
Explaination
Document represents the entire XML document. A Document object is often referred to as a DOM tree.
Q 4 - Which component of JDOM Parser represents XML attribute?
Answer : C
Explaination
Element represents an attribute of an element. Attribute has method to get and set the value of attribute. It has parent and attribute type.
Q 5 - Which of the following XPath expression will select all nodes with the given name 'nodename'?
Answer : A
Explaination
nodename selects all nodes with the given name 'nodename'.
Q 6 - Which of the following XPath expression selects the parent of the current node?
Answer : B
Explaination
.. selects the parent of the current node.
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.
Answer : B
Explaination
Using XSD, DTD and XML structure can be validated easily.
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 - Which of the following predicate selects the last student element that is the child of the class element?
Answer : B
Explaination
/class/student[last()] predicate selects the last student element that is the child of the class element.