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 : D

Explaination

All of the above options are correct.

Answer : C

Explaination

JDOM Parser is of low memory footprint and is nearly as fast as SAX.

Q 4 - Which method of JDOM Parser builds the JDOM document from the xml source?

A - SAXBuilder.build(xmlSource)

B - Document.getRootElement()

C - Node.getRootElement()

D - Node.getChild(Name)

Answer : A

Explaination

SAXBuilder.build(xmlSource) builds the JDOM document from the xml source.

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.

Q 8 - XML is Technology agnostic.

A - true

B - false

Answer : A

Explaination

Being plain text, XML is technology independent. It can be used by any technology for data storage and transmission purpose.

Answer : C

Explaination

StAX is a JAVA based PULL API to parse XML document. It is very quick API and uses streams.

Q 10 - Which of the following predicate selects the last student element that is the child of the class element?

A - /class/student[1]

B - /class/student[last()]

C - /class/student[first()-1]

D - None of the above.

Answer : B

Explaination

/class/student[last()] predicate selects the last student element that is the child of the class element.


java_xml_questions_answers.htm

Advertisements