Java XML Mock Test I
Java XML Mock Test I
This section presents you various set of Mock Tests related to JAVA XML Framework. You can
download these sample mock tests at your local machine and solve offline at your convenience.
Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
A - XML is technology independent. It can be used by any technology for data storage and
transmission purpose.
Q 4 - Which of the following parses the document by loading the complete contents of
the document and creating its complete hiearchical tree in memory?
A - Dom Parser
B - SAX Parser
C - JDOM Parser
D - StAX Parser
Q 5 - Which of the following parses the document on event based triggers and does
not load the complete document into the memory?
A - Dom Parser
B - SAX Parser
C - JDOM Parser
D - StAX Parser
Q 6 - Which of the following parses the document in similar fashion to DOM parser but
in more easier way?
A - Dom Parser
B - SAX Parser
C - JDOM Parser
D - StAX Parser
Q 7 - Which of the following parses the document in similar fashion to SAX parser but
in more efficient way?
A - Dom Parser
B - SAX Parser
C - JDOM Parser
D - StAX Parser
Q 8 - Which of the following parses the XML based on expression and is used
extensively in conjuction with XSLT?
A - XPath Parser
B - SAX Parser
C - JDOM Parser
D - StAX Parser
Q 9 - Which of the following provides options to parse XML, XPath and XSLT using
Java Collections Framework and provides support for DOM, SAX and JAXP?
A - XPath Parser
B - DOM4J Parser
C - JDOM Parser
D - StAX Parser
Q 10 - Which of the following component represent base datatype of the DOM in DOM
Parsing?
A - Node
B - Element
C - Attr
D - Document
A - Text
B - Element
C - Attr
D - Document
Q 12 - Which of the following method returns the root element of the document in
DOM Parsing?
A - Node.getRoot
B - Document.getDocumentElement
C - Node.getFirstChild
D - Node.getLastChild
Q 13 - 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
B - It defines an interface that enables programs to access and update the style, structure,and
contents of XML documents.
A - When you parse an XML document with a DOM parser, you get back a tree structure that
contains all of the elements of your document.
B - The DOM Parser provides a variety of functions you can use to examine the contents and
structure of the document.
A - true
B - false
A - SAX parser reads an XML document from top to bottom, recognizing the tokens that make up
a well-formed XML document.
B - SAX parser reports the application program the nature of tokens that the parser has
encountered as they occur
C - The application program provides an 'event' handler that must be registered with the parser.
D - All of the above.
A - true
B - false
Q 22 - Which of the following method get called when document begins in SAX
parsing?
A - startDocument
B - endDocument
C - startElement
D - endElement
Q 23 - Which of the following method get called when document ends in SAX parsing?
A - startDocument
B - endDocument
C - startElement
D - endElement
Q 24 - Which of the following method get called when element starts in SAX parsing?
A - startDocument
B - endDocument
C - startElement
D - endElement
Q 25 - Which of the following method get called when element ends in SAX parsing?
A - startDocument
B - endDocument
C - startElement
D - endElement
ANSWER SHEET
1 B
2 D
3 D
4 A
5 B
6 C
7 D
8 A
9 B
10 A
11 A
12 B
13 C
14 C
15 D
16 C
17 A
18 B
19 C
20 D
21 B
22 A
23 B
24 C
25 D
Loading [MathJax]/jax/output/HTML-CSS/jax.js