XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.

advertisement
 Resource Guide -> Tutorials -> Organizing XML with Entities

Organizing XML with Entities

Date: Mar. 2, 2001
Link: http://xml.oreilly.com/news/learningxml_0101.html
Source Author or Organization: Erik T. Ray, O'Reilly & Associates

In this article, excerpted from the O'Reilly & Associates book Learning XML by Erik T. Ray, the author exposes users familiar with the limited use of entities in HTML to the richer entity capabilities of XML.

The article first reviews basics, defining the storage units known as entities (a subset of an XML document containing text and markup, called mixed content), and discussing the power inherent is this ability to name and manipulate subsets. Applications range from boilerplating text to spreading large documents over several pages, each of which is easier to digest and a sharable resource for other documents.

Using a named (or general) entity requires a declaration, and entity declaration syntax is examined. The author points to benefits of this storage and retrieval method for text bits: consistency through every instance of repeating text, a powerful labor saving device when dealing with repeating information, and an agent for minimizing repetitive typing. The article closes with a look at external entities.