Java XML Online Quiz


Advertisements

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.

Questions and Answers

Answer : B

Explaination

XML stands for Extensible Markup Language.

Q 2 - Which of the following method returns the first child of a given Node in DOM Parsing?

A - Node.getChild()

B - Document.getFirstChild()

C - Node.getFirstChild()

D - Node.getLastChild()

Answer : C

Explaination

Node.getFirstChild() returns the first child of a given Node in DOM Parsing.

Q 3 - Which of the following method get called when element ends in SAX parsing?

A - startDocument()

B - endDocument()

C - startElement()

D - endElement()

Answer : D

Explaination

endElement() method is called at the end of an element.

Q 4 - Which component of JDOM Parser represents comments in a XML document?

A - Comment

B - Element

C - Attribute

D - Text

Answer : A

Explaination

Comment represents comments in a XML document.

Q 5 - XPath is one of the major element in XSLT standard and is must have knowledge in order to work with XSLT documents.

A - false

B - true

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.

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.

Answer : A

Explaination

Parsing XML refers to going through XML document to access data or to modify data in one or other way.

Answer : C

Explaination

JDOM is an open source, java based library to parse XML document and it is typically java developer friendly API.

Q 10 - Can we modify an XML document using StAX parser?

A - true

B - false

Answer : A

Explaination

Yes! Using StAX parser, we can parse, modify and even create a XML document.

java_xml_questions_answers.htm
Advertisements