XML Tutorials - Herong's Tutorial Examples - v5.25, by Herong Yang
ENTITY - Entity Declaration Statement
This section describes syntax formats of the ENTITY statement, which is used to declare an XML entity. The ENTITY statement specifies what is the name of the entity and what is the replacement value.
ENTITY: is a DTD statement that defines an XML entity, and associates a value with the entity.
The syntax of ENTITY statement is:
<!ENTITY entity_name "entity_value">
Examples of ENTITY statements:
<!ENTITY author "Herong Yang"> <!ENTITY copyright "©">
Once an entity is defined, it can be used in any parsed text in the following form:
&entity_name;
When an XML entity is encountered, the XML parser will replace it with its value defined in the ENTITY statement.
Note that XML language has 5 pre-defined entities, which can be used without declaring them in the document type:
Entity Character & & ' ' > > < < "e; "
Table of Contents
Introduction of XML (eXtensible Markup Language)
DOM (Document Object Model) Programming Interface
SAX (Simple API for XML) Programming Interface
DTD (Document Type Definition) Introduction
DOCTYPE - Document Type Declaration Statement
ELEMENT - Element Declaration Statement
ATTLIST - Attribute List Declaration Statement
►ENTITY - Entity Declaration Statement
dictionary_dtd.xml - XML DTD Document Type Example
Validating an XML Document against the Specified DTD Document Type
XSD (XML Schema Definition) Introduction
Validating XML Documents Against Specified XML Schemas
XSL (Extensible Stylesheet Language) Introduction
XSLT (XSL Transformations) Introduction
XSLT Elements as Programming Statements
Control and Generate XML Element in the Result
PHP Extensions for XML Manipulation
Processing XML with Python Scripts
XML Tools Plugin for Notepad++
XML Plugin Packages for Atom Editor