Name
createEntityReference: name
Synopsis
This creates an EntityReference
object.
Argument
- name: DOMString
The name of the XML entity to be referenced. The name must match an XML entity declaration that is valid in the current document.
Exceptions
- INVALID_CHARACTER_ERR
Indicates that the name you passed to
createEntityReference(
)
is not a legal valid XML name. See Chapter 2 for the XML restrictions on name construction.- NOT_SUPPORTED_ERR
Generated if you attempted to create an entity reference using an HTML document.
Java binding
public EntityReference createEntityReference(String name) throws DOMException;
Java example
// Create an entity reference EntityReference er = doc.createEntityReference("name_entity");
Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.