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 document in similar fashion to DOM parser but in more easier way?
JDOM Parser parses the document in similar fashion to DOM parser but in more easier way.
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 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 component of JDOM Parser represents XML attribute?
Element represents an attribute of an element. Attribute has method to get and set the value of attribute. It has parent and attribute type.
Q 5 - XPath is one of the major element in XSLT standard and is must have knowledge in order to work with XSLT documents.
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 XPath expression ensures that selection starts from the root node?
/ ensures that selection starts from the root node.
Yes! Using DOM4J parser, we can parse, modify and create a XML document.
In XML, custom tags can be created and used very easily.
StAX parser is a PULL API. It means in case of StAX parser, client application need to ask StAX parser to get information from XML whenever it needs.
Q 10 - When to use a StAX Parser?
In both of the above situations, StAX parser is preferred.