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.
Yes! Using DOM parser, we can parse, modify or create a XML document.
Q 3 - Which of the following method is used to read contents in SAX parsing?
characters() method is called when character data is encountered and can be used to read contents.
Q 4 - Which component of JDOM Parser represents text of XML tag?
Text represents the text of XML tag.
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 [...] .
. selects the current node.
Q 7 - Which of the following is true about Attribute Class of DOM4J Parser?
Attribute Class represents an attribute of an element. Attribute has method to get and set the value of attribute. It has parent and attribute type.
Q 8 - When to use a SAX Parser?
In all of the above situations, SAX parsing is preferred.
Yes! Using StAX parser, we can parse, modify and create a XML document.
Q 10 - Which method of the following of StAX Parser can be used to retrieve value and attributes of element?
StartElement asStartElement() of XMLEventReader class can be used to retrieve value and attributes of element.