- 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
Java XML Online Quiz
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.
Q 1 - 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 2 - 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.
Answer : B
Explaination
No! Using SAX parser, we can only parse or modify a XML document.
Q 4 - Which method of JDOM Parser builds the JDOM document from the xml source?
Answer : A
Explaination
SAXBuilder.build(xmlSource) builds the JDOM document from the xml source.
Q 5 - Predicate in XPath are used to find specific node or a node containing specific value and are defined using [...] .
Answer : B
Explaination
Predicate in XPath are used to find specific node or a node containing specific value and are defined using [...] .
Answer : A
Explaination
. selects the current node.
Answer : A
Explaination
Yes! Using DOM4J parser, we can parse, modify and create a XML document.
Answer : A
Explaination
SAX Parser is PUSH API Parser so that client application is required to get information when SAX parser notifies the client application that information is available.
Q 9 - When to use a JDOM Parser?
A - You need to use the information in the document more than once.
B - You are a java developer and want to leverage java optimized parsing of XML.
Answer : C
Explaination
In both of the above situations, JDOM parser is preferred.
Q 10 - Which method of the following of StAX Parser can be used to add start element of given name?
A - writeStartElement(String localName)
B - writeEndElement(String localName)
Answer : A
Explaination
writeStartElement(String localName) of XMLStreamWriter class can be used to add start element of given name.
To Continue Learning Please Login
Login with Google