public void addTagClose (String tagName) throws DocumentBuilderException {
XMLNode currentNode = peek ();
if (!(currentNode instanceof Element) ||
!((Element) currentNode).getName ().equals (tagName)) {
throw new DocumentBuilderException (
"Cannot close element: " + tagName + ".");
}
pop ();
}