Sams Teach Yourself XML in 21 Days

Sams Teach Yourself XML in 21 Days

By Steven Holzner

Day 5. Handling Attributes and Entities in DTDs

Yesterday you got your start with DTDs by seeing how to declare and handle elements. But that's only part of the story. Today's discussion continues with DTDs, explaining how to handle the other items you can declare in DTDs—attributes and entities. Both attributes and entities are essential parts of XML, and today's discussion will explain how to support them in valid XML documents. Here's an overview of the topics covered in today's discussion:

The term entity might seem worrisome, but it's actually very simple: In an XML document, an entity is simply a data item. In other words, entity is simply XML's way of referring to a piece of data. And you already know about the other big topic for today—attributes, which we'll start discussing now.

Share ThisShare This

Informit Network