XML

Workshop

The Workshop is designed to help you anticipate possible questions, review what you've learned, and begin learning how to put your knowledge into practice.

Quiz

1.

How do you identify a comment in an XML document?

2.

What is the significance of the document entity?

3.

If you needed to reference a binary image file in an XML document, what kind of entity would you use?

4.

What is the difference between internal and external entities?

Quiz Answers

1.

Comments are specified in a document between the <!-- and --> symbols.

2.

The document entity is the top-level entity for a document and contains all other entities in the document.

3.

In order to reference binary data in an external file, you must use an unparsed entity.

4.

Internal entities are stored within the document that references them and are always parsed entities. External entities are stored outside of the document that references them and can be either parsed or unparsed entities.

Exercises

1.

Change the comments in the radio.xml example document so that the Rap station is disabled and the Country station is enabled.

2.

Modify the trainlog.xml example document so that it uses general entities for each of the training locations: Warner Park and Natchez Trace Parkway. These entities eliminate the need to repeatedly enter the locations as additional training sessions are entered.