Attributes Entitites   «Prev  Next»

Choosing Correct Parser - Exercise

Using an XML parser

Objective: Match the parser to the correct scenario.
This exercise uses a Java applet to allow you to match items in the left column with the items in the right column. If you do not have Java active in your browser or are behind a firewall that does not allow Java applets, you will not be able to complete this exercise. If you do not see the applet below, click OK, I'm Done to continue with the course. You will receive full credit for this exercise.

Scoring

This exercise is not scored. It's an opportunity for you to check your understanding of the types of parsers.
When you're finished, click the Submit button to receive credit for having completed it.

Instructions

In the left column below are three parsers; the corresponding scenarios for each parser are in the right column. Click once on a parser in the left column, then click once on the scenario in the right column to make a match.
When you think you have all of the parsers and their scenarios matched correctly, click the Done button and you'll see whether or not you've matched the terms correctly--green lines mean the match is correct, red lines mean the match is incorrect. If you didn't get the matches right the first time, click Clear to erase your matches and try again.
  1. SAX parser
  2. DOM parser
  3. Non-validating parser
  4. Validating parser
  1. An application requires access to some elements of the |||XML document.
  2. An application requires access to the entire document tree.
  3. An application is mainly concerned with access to elements |||content. Document validity has been established a priori.
  4. An application is concerned with the validity of an XML |||document against a specified DTD and well-formedness