- 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 parses the document in similar fashion to SAX parser but in more efficient way?
Answer : D
Explaination
StAX Parser parses the document in similar fashion to SAX parser but in more efficient way.
Q 2 - Which of the following is true about DOM Parser?
Answer : C
Explaination
When you parse an XML document with a DOM parser, you get back a tree structure that contains all of the elements of your document. The DOM provides a variety of functions you can use to examine the contents and structure of the document.
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.
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 - 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.
Answer : B
Explaination
No! XPath parser is used to to navigate XML Document only. It is better to use DOM parser for creating XML.
Q 7 - Which of the following is true about Document Class of DOM4J Parser?
A - It represents the entire XML document. A Document object is often referred to as a DOM tree.
C - It represents Element, Attribute or ProcessingInstruction.
Answer : A
Explaination
Document Class represents the entire XML document. A Document object is often referred to as a DOM tree.
Answer : B
Explaination
Using XSD, DTD and XML structure can be validated easily.
Q 9 - When to use a JDOM Parser?
A - You need to know a lot about the structure of a document.
Answer : C
Explaination
In both of the above situations, JDOM parser is preferred.
Q 10 - Which of the following predicate selects the first student element that is the child of the class element?
Answer : A
Explaination
/class/student[1] predicate selects the first student element that is the child of the class element.
To Continue Learning Please Login
Login with Google