ZVON > References > DOM2 Reference

createEntityReference (method )

Owning interface and usage:  
Document.createEntityReference(name)

Member of these other interfaces:  
none

Description:  
Creates an EntityReference object.

Parameters:  
DOMString name  -  The name of the entity to reference.

Returns:  
EntityReference -  The new EntityReference object.

Exceptions:  
DOMException INVALID_CHARACTER_ERR
Raised if the specified name contains an illegal character.
DOMException NOT_SUPPORTED_ERR
Raised if this document is an HTML document.

Note:  
If the referenced entity is known, the child list of the EntityReference node is made the same as that of the corresponding Entity node.


Example: