- 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 - What DOM stands for?
Answer : C
Explaination
DOM stands for Document Object Model.
Q 3 - Which of the following method get called when element ends in SAX parsing?
Answer : D
Explaination
endElement() method is called at the end of an element.
Q 4 - Which method of JDOM Parser gets the root element of the XML?
Answer : B
Explaination
Document.getRootElement() get the root element of the XML.
Q 5 - XPath provides a rich library of standard functions for manipulation of string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, Boolean values etc.
Answer : A
Explaination
XPath provides a rich library of standard functions for manipulation of string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, Boolean values etc.
Q 6 - Which of the following XPath expression selects all student elements that are children of class?
Answer : D
Explaination
class/student selects all student elements that are children of class.
Q 7 - Which of the following method of DOM4J Parser gets all the attributes of an element?
Answer : A
Explaination
Element.attributes() gets all the attributes of an element.
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.
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 method of the following of StAX Parser can be used to obtain characters such a CDATA, whitespace etc?
Answer : C
Explaination
Characters asCharacters() of XMLEventReader class can be used to obtain characters such a CDATA, whitespace etc.