- 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 component represent actual content of an element or attribute in DOM Parsing?
Answer : A
Explaination
Text represents the actual content of an Element or Attr.
Q 3 - Which of the following method get called when document ends in SAX parsing?
Answer : B
Explaination
endDocument() method is called at the end of a document.
Answer : A
Explaination
Yes! Using JDOM parser, we can parse, modify or create a XML document.
Q 5 - Which of the following is true about XPath?
A - XPath is an official recommendation of the World Wide Web Consortium (W3C).
B - It defines a language to find information in an XML file.
Answer : C
Explaination
XPath is an official recommendation of the World Wide Web Consortium (W3C).It defines a language to find information in an XML file.
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.
Answer : B
Explaination
In XML, custom tags can be created and used very easily.
Q 9 - What are the advantages of JDOM parser?
A - flexibility and easy maintainablity of xml parsing code.
Answer : C
Explaination
JDOM gives java developers flexibility and easy maintainablity of xml parsing code. It is light weight and quick API.
Q 10 - Which method of the following of StAX Parser can be used to retrieve value and attributes of element?
Answer : A
Explaination
StartElement asStartElement() of XMLEventReader class can be used to retrieve value and attributes of element.