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.
Q 1 - What XML stands for?
XML stands for Extensible Markup Language.
Q 2 - Which of the following is true about XML?
B - XML uses simple text format. It is human readable and understandable.
C - Using XSD, DTD and XML structure can be validated easily.
All of the above options are correct.
Q 3 - Which of the following is true about XML?
B - XML is a tag based language like HTML.
All of the above options are correct.
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?
Dom Parser parses the document by loading the complete contents of the document and creating its complete hiearchical tree in memory.
Q 5 - Which of the following parses the document on event based triggers and does not load the complete document into the memory?
SAX Parser parses the document on event based triggers and does not load the complete document into the memory.
Q 6 - 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 7 - Which of the following parses the document in similar fashion to SAX parser but in more efficient way?
StAX Parser parses the document in similar fashion to SAX parser but in more efficient way.
Q 8 - Which of the following parses the XML based on expression and is used extensively in conjuction with XSLT?
XPath Parser parses the XML based on expression and is used extensively in conjuction with XSLT.
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?
DOM4J Parser is a java library to parse XML, XPath and XSLT using Java Collections Framework , provides support for DOM, SAX and JAXP.
Q 10 - Which of the following component represent base datatype of the DOM in DOM Parsing?
Node represents the base datatype of the DOM.
Q 11 - Which of the following component represent actual content of an element or attribute in DOM Parsing?
Text represents the actual content of an Element or Attr.
Q 12 - Which of the following method returns the root element of the document in DOM Parsing?
Document.getDocumentElement() returns the root element of the document in DOM Parsing.
Q 13 - 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 14 - What DOM stands for?
DOM stands for Document Object Model.
Q 15 - Which of the following is true about DOM?
A - It is an official recommendation of the World Wide Web Consortium (W3C).
C - XML parsers that support the DOM implement DOM interface.
DOM is an official recommendation of the World Wide Web Consortium (W3C). It defines an interface that enables programs to access and update the style, structure,and contents of XML documents. XML parsers that support the DOM implement that interface.
Q 16 - Which of the following is true about DOM Parser?
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. The DOM provides a variety of functions you can use to examine the contents and structure of the document.
Yes! Using DOM parser, we can parse, modify or create a XML document.
Q 18 - What SAX stands for?
SAX stands for Simple API for XML.
Q 19 - Which of the following is true about SAX parsing?
A - SAX is an event-based parser for xml documents.
B - Unlike a DOM parser, a SAX parser creates no parse tree.
SAX (the Simple API for XML) is an event-based parser for xml documents.Unlike a DOM parser, a SAX parser creates no parse tree.
Q 20 - Which of the following is true about SAX parsing?
C - The application program provides an 'event' handler that must be registered with the parser.
All of the above are true.
No! Using SAX parser, we can only parse or modify a XML document.
Q 22 - Which of the following method get called when document begins in SAX parsing?
startDocument() method is called at the beginning of a document.
Q 23 - Which of the following method get called when document ends in SAX parsing?
endDocument() method is called at the end of a document.
Q 24 - Which of the following method get called when element starts in SAX parsing?
startElement() method is called at the start of an element.
Q 25 - Which of the following method get called when element ends in SAX parsing?
endElement() method is called at the end of an element.
Question Number | Answer Key |
---|---|
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 |