EntitiesThe content of an element can include entities. An entity is shorthand for a piece of text. Entities are declared in the DTD (see the previous section) and have a name and a content. In addition, entities are inserted in the document between the & and ; characters . Assuming the entity axs was declared with the content Applied XML Solutions , the parser will resolve <title>&axs;</title> as <title>Applied XML Solutions</title> Predefined EntitiesXML predefines a small number of entities to escape special characters:
Character EntitiesXML also defines character entities. A character entity references a single Unicode character. They are typically used to call characters that are not legal in the current encoding. The name of character entities has the form # number , where number is the Unicode code for the character. For example, is Unicode character 169 , so <notice>© 2000, Pineapplesoft</notice> is equivalent to <notice> 2000, Pineapplesoft</notice> |