- 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 is a tag based language like HTML.
Answer : D
Explaination
All of the above options are correct.
Q 2 - Which of the following is true about DOM?
A - It is an official recommendation of the World Wide Web Consortium (W3C).
C - XML parsers that support the DOM implement DOM interface.
Answer : D
Explaination
DOM is an official recommendation of the World Wide Web Consortium (W3C). It defines an interface that enables programs to access and update the style, structure,and contents of XML documents. XML parsers that support the DOM implement that interface.
Q 3 - Which of the following is true about JDOM Parser?
A - It is of low memory footprint.
Answer : C
Explaination
JDOM Parser is of low memory footprint and is nearly as fast as SAX.
Q 4 - Which component of JDOM Parser represents text of XML tag?
Answer : D
Explaination
Text represents the text of XML tag.
Q 5 - Which of the following is true about XPath?
A - XPath is used to traverse elements and attributes of an XML document.
Answer : C
Explaination
XPath is used to traverse elements and attributes of an XML document. XPath provides various type of expressions which can be used to enquire relevant information from the XML document.
Answer : A
Explaination
. selects the current node.
Answer : A
Explaination
Yes! Using DOM4J parser, we can parse, modify and create a XML document.
Q 8 - What is XML Parser?
A - XML Parser provides way how to access data present in an XML document.
B - XML Parser provides way how to modify data present in an XML document.
Answer : C
Explaination
XML Parser provides way how to access or modify data present in an XML document.
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 method of the following of StAX Parser can be used to add start element of given name?
A - writeStartElement(String localName)
B - writeEndElement(String localName)
Answer : A
Explaination
writeStartElement(String localName) of XMLStreamWriter class can be used to add start element of given name.