// Find the handler and pop it from the handler stack.
ElementHandler handler = (ElementHandler) handlers.get(path);
handlerStack.remove(handlerStack.size() - 1);
// Call the handlers onEnd method
handler.onEnd(elementPath);
} else {
// No handler is associated with this node, so use the
// defaultHandler it it exists.
if (handlerStack.isEmpty() && (defaultHandler != null)) {
defaultHandler.onEnd(elementPath);