XML Programming - Basic
This exam tests your knowledge of popular Java APIs for reading and manipulating XML:
- SAX
(Simple API for XML)
- StAX
(Streaming API for XML)
- JDOM
- XStream
(an API for serializing objects to XML)
The knowledge required to pass the XML Core - Basic
exam is a prerequisite for this one. Therefore questions on general XML knowledge are out of scope for this exam.
| Released | Beta | Frozen | ||
|---|---|---|---|---|
SAX
Simple API for XML
|
|
|||
Principle 1 question
Understand that SAX follows an event-driven push model.
Understand that SAX doesn't require to load the whole file XML document in memory. Understand that SAX is composed of 2 parts (+ your code = 3 parts): org.xml.sax interfaces and an implementation (as Xerces). |
2 | 32 | 9 | |
XMLReader 1 question
Know how to turn the validation on/off for DTDs and Schemas with Xerces.
Get an XMLReader from a XMLReaderFactory.
Link a ContentHandler to the reader. Parse a document and catch appropriate exceptions. |
3 | 0 | 6 | |
ContentHandler 3 questions
Understand the purpose and basic usage of each method of the ContentHandler interface.
The features, properties, and filters are not part of this exam.
|
4 | 0 | 14 | |
StAX
Streaming API for XML
|
|
|||
Principle 1 question
Know the mechanism difference between SAX and StAX (push event vs pull)
|
7 | 9 | 6 | |
API 1 question
Know how to get an XMLStreamReader from an XMLInputFactory.
Get the next event and identify its type (from start/end document, start/end element, character). Get the content: name of an element, text content of an element, attribute values of an element. |
4 | 0 | 5 | |
JDOM |
|
|||
Principle 1 question
Understand that Dom and JDom are tree-based pull models.
Understand the core differences between JDom and DOM:
|
4 | 10 | 10 | |
Builders 1 question
Know that JDom uses a parser (SAX or DOM) to read XML files and build its tree.
Know the basic usage of the SAXBuilder. |
1 | 1 | 13 | |
Document 3 questions
Know how to use the main classes for representing an XML document and their relationships: Document, Element, Attribute, Text.
Be able to navigate through the tree of elements (recursively if necessary). |
5 | 1 | 24 | |
Output 1 questionKnow the basic usage of the XMLOutputter and Format classes. |
5 | 0 | 7 | |
XStream 1 question(Based on versions up to 1.1.x) Use XStream to convert a POJO graph into an XML file and back, including managing the graph boundaries. Basic usage of the XStream.alias method. Note: converters are out of scope. |
4 | 7 | 8 | |
Exam information
- 18 minutes
- 14 questions (201)
- 80% required
- +3 √
- - 4 points
- 15 day delay
- status: released



