O'Reilly logo

Inside XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Entities

In the previous chapter, we received an introduction to the idea of entities in XML documents. Two kinds of entities exist: general entities and parameter entities. General entities are probably used by more XML authors because you use them in the content of your XML document, but parameter entities, which you use in a document's DTD, are also available and are very powerful.

So what exactly is an entity? An entity is simply XML's way of referring to a data item; entities are usually text, but they can also be binary data. You declare an entity in a DTD and then refer to it by reference in your document. General entity references start with & and end with ;, parameter entity references start with % and end with ;. For text entities, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required