"Entity references not allowed here.");
}
}
public void addComment (String content) throws DocumentBuilderException {
XMLNode currentNode = peek ();
if (currentNode instanceof Element ||
currentNode instanceof Document) {
currentNode.addChild (new Comment (content));
} else {
throw new DocumentBuilderException (
"Comments not allowed here.");
}
}