DOM Document createEntityReference Method
Example
Create an EntityReference for &
xmlDoc.createEntityReference("amp");
The result will be:
&
Description
The createEntityReference() method creates the specified EntityRerence Object.
Note: This method is intended for XML and will not work for HTML documents.
Browser Support
| Method | |||||
|---|---|---|---|---|---|
| createEntityReference() | Yes | Yes | Yes | Yes | Yes |
Note: This method is made for the XML DOM, and will not work for HTML documents.
Syntax
document.createEntityReference(entityname)
Parameters
| Parameter | Type | Description |
|---|---|---|
| entityname | String | The name of the entity reference you want to create |
Return Value
| Type | Description |
|---|---|
| EntityReference object | The created EntityReference node |
Technical Details
| DOM Version | Core Level 1 |
|---|