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 XML based on expression and is used extensively in conjuction with XSLT?
XPath Parser parses the XML based on expression and is used extensively in conjuction with XSLT.
Q 2 - Which of the following method returns the first child of a given Node in DOM Parsing?
Node.getFirstChild() returns the first child of a given Node in DOM Parsing.
Q 3 - Which of the following method get called when document begins in SAX parsing?
startDocument() method is called at the beginning of a document.
Q 4 - Which method of JDOM Parser gets the root element of the XML?
Document.getRootElement() get the root element of the XML.
Q 5 - Which of the following is true about XPath?
XPath is an official recommendation of the World Wide Web Consortium (W3C).It defines a language to find information in an XML file.
. selects the current node.
Q 7 - Which of the following method of DOM4J Parser gets all the attributes of an element?
Element.attributes() gets all the attributes of an element.
Q 8 - When to use a DOM Parser?
In all of the above situations, DOM parsing is preferred.
Q 9 - What are the advantages of JDOM parser?
JDOM gives java developers flexibility and easy maintainablity of xml parsing code. It is light weight and quick API.
Yes! Using StAX parser, we can parse, modify and even create a XML document.