- Java XML Tutorial
- Java XML Home
- Java XML Overview
- Java XML Parsers
- Java DOM Parser
- Java DOM Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java SAX Parser
- Java SAX Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- JDOM XML Parser
- JDOM XML Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java StAX Parser
- Java StAX Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java XPath Parser
- Java XPath Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java DOM4J Parser
- Java DOM4J Parser
- Parse XML Document
- Query XML Document
- Create XML Document
- Modify XML Document
- Java XML Useful Resources
- Java XML - Questions and Answers
- Java XML - Quick Guide
- Java XML - Useful Resources
- Java XML - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
JAVA XML Mock Test
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.
JAVA XML Mock Test I
Q 1 - What XML stands for?
Answer : B
Explaination
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.
Answer : D
Explaination
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.
Answer : D
Explaination
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?
Answer : A
Explaination
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?
Answer : B
Explaination
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?
Answer : C
Explaination
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?
Answer : D
Explaination
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?
Answer : A
Explaination
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?
Answer : B
Explaination
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?
Answer : A
Explaination
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?
Answer : A
Explaination
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?
Answer : B
Explaination
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?
Answer : C
Explaination
Node.getFirstChild() returns the first child of a given Node in DOM Parsing.
Q 14 - What DOM stands for?
Answer : C
Explaination
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.
Answer : D
Explaination
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?
Answer : C
Explaination
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.
Answer : A
Explaination
Yes! Using DOM parser, we can parse, modify or create a XML document.
Q 18 - What SAX stands for?
Answer : B
Explaination
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.
Answer : C
Explaination
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.
Answer : D
Explaination
All of the above are true.
Answer : B
Explaination
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?
Answer : A
Explaination
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?
Answer : B
Explaination
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?
Answer : C
Explaination
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?
Answer : D
Explaination
endElement() method is called at the end of an element.
Answer Sheet
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 |