- 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 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 2 - 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 3 - Which component of JDOM Parser represents XML Element?
Answer : B
Explaination
Element represents an XML element. Element object has methods to manipulate its child elements,its text, attributes and namespaces.
Q 4 - Which component of JDOM Parser represents XML attribute?
Answer : C
Explaination
Element represents an attribute of an element. Attribute has method to get and set the value of attribute. It has parent and attribute type.
Q 5 - XPath is one of the major element in XSLT standard and is must have knowledge in order to work with XSLT documents.
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 : A
Explaination
. selects the current node.
Q 7 - Which of the following method of DOM4J Parser gets all the attributes of an element?
Answer : A
Explaination
Element.attributes() gets all the attributes of an element.
Answer : A
Explaination
Being plain text, XML is technology independent. It can be used by any technology for data storage and transmission purpose.
Answer : A
Explaination
StAX parser is a PULL API. It means in case of StAX parser, client application need to ask StAX parser to get information from XML whenever it needs.
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