- 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
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 component represent base datatype of the DOM in DOM Parsing?
Answer : A
Explaination
Node represents the base datatype of the DOM.
Q 2 - Which of the following method returns the first child of a given Node in DOM Parsing?
Answer : C
Explaination
Node.getFirstChild() returns the first child of a given Node in DOM Parsing.
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 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 defines the parts of an XML document like element, attribute, text, namespace, processing-instruction, comment, and document nodes.
Answer : A
Explaination
XPath defines the parts of an XML document like element, attribute, text, namespace, processing-instruction, comment, and document nodes.
Q 6 - Which of the following XPath expression ensures that selection starts from the root node?
Answer : B
Explaination
/ ensures that selection starts from the root node.
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
Yes! Using SAX parser, we can parse, modify a XML document.
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.
To Continue Learning Please Login
Login with Google