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 SAX parsing?
C - The application program provides an 'event' handler that must be registered with the parser.
Answer : D
Explaination
All of the above are true.
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 method of JDOM Parser builds the JDOM document from the xml source?
Answer : A
Explaination
SAXBuilder.build(xmlSource) builds the JDOM document from the xml source.
Q 5 - XPath is one of the major element in XSLT standard and is must have knowledge in order to work with XSLT documents.
Answer : B
Explaination
XPath is one of the major element in XSLT standard and is must have knowledge in order to work with XSLT documents.
Q 6 - Which of the following is true about DOM4J Parser?
A - DOM4J is java optimized and uses java collection like List and Arrays.
B - It works with DOM, SAX, XPath and XSLT.
C - It can parse large XML document with very low memory footprint.
Answer : D
Explaination
DOM4J is java optimized, it uses java collection like List and Arrays. It works with DOM, SAX, XPath and XSLT. It can parse large XML document with very low memory footprint.
Q 7 - Which of the following is true about Node 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 : C
Explaination
Node Class represents Element, Attribute or ProcessingInstruction.
Answer : A
Explaination
Being plain text, XML is technology independent. It can be used by any technology for data storage and transmission purpose.
Q 9 - What is a StAX Parser?
A - StAX is a JAVA based PULL API to parse XML document.
Answer : C
Explaination
StAX is a JAVA based PULL API to parse XML document. It is very quick API and uses streams.
Q 10 - Which of the following predicate selects the last student element that is the child of the class element?
Answer : B
Explaination
/class/student[last()] predicate selects the last student element that is the child of the class element.