XML.EntityReferenceStart and XML.EntityReferenceEnd
When an entity reference is encountered in the XML message, both the expanded form and the original entity name are stored in the syntax element tree. The name of the entity is stored as the value of the EntityReferenceStart and EntityReferenceEnd syntax elements, and any syntax elements between contain the entity expansion.
The following examples show the XML entity references in an XML document, and in tree structure form.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE example [ <!ENTITY entityName "eValue"> ]>
<example>Test: &entityName;</example>
The XML declaration and the document type declaration are not shown here. Refer to XMLNS: The XML declaration and XMLNS: The DTD for details of those sections of the syntax element tree.