String name = event.asEndElement().getName()
.getLocalPart();
if (skippedElements.size() == 0
|| !skippedElements.peek().equals(name)) {
throw new GraphIOException(
"Failed parsing GraphML document - startTag/endTag mismatch");
}
// Pop the stack.
skippedElements.pop();