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 - What XML stands for?
XML stands for Extensible Markup Language.
Q 2 - Which of the following is true about DOM?
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?
JDOM Parser is java optimized, it uses java collection like List and Arrays. It works with DOM and SAX APIs and combines the best of the two.
Q 4 - Which method of JDOM Parser gets all the direct child nodes of an element?
Element.getChildren() gets all the direct child nodes of an element.
Q 5 - Predicate in XPath are used to find specific node or a node containing specific value and are defined using [...] .
Predicate in XPath are used to find specific node or a node containing specific value and are defined using [...] .
Q 6 - Which of the following XPath expression ensures that selection starts from the root node?
/ ensures that selection starts from the root node.
Q 7 - Which of the following is true about Node Class of DOM4J Parser?
Node Class represents Element, Attribute or ProcessingInstruction.
Q 8 - What is XML Parser?
XML Parser provides way how to access or modify data present in an XML document.
Q 9 - What is a StAX Parser?
StAX is a JAVA based PULL API to parse XML document. It is very quick API and uses streams.
Q 10 - Which method of the following of StAX Parser can be used to add end element of given name?
writeEndElement(String localName) of XMLStreamWriter class can be used to add end element of given name.