public void addEntityReference (String entityName)
throws DocumentBuilderException {
XMLNode currentNode = peek ();
if (currentNode instanceof Element) {
currentNode.addChild (new EntityReference (entityName));
} else {
throw new DocumentBuilderException (
"Entity references not allowed here.");
}
}