Programmer's Guide > Interfaces > W3C Document interface > createEntityReference method
  
createEntityReference method
Creates an EntityReference object. In addition, if the referenced entity is known, the child list of the EntityReference node is made the same as that of the corresponding Entity node.
* 
If any descendant of the Entity node has an unbound namespace prefix, the corresponding descendant of the created EntityReference node is also unbound; (its namespaceURI is null). The DOM Level 2 does not support any mechanism to resolve namespace prefixes.
createEntityReference(name )
Parameters
Stringname
The name of the entity to reference.
Returns
EntityReference. The new EntityReference object.
Throws
DOMException
INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.