void (CharSequence localName, String namespace, int startoffset, int endoffset) { String name = localName.toString(); if (StringUtil.isEmptyOrSpaces(name)) return; for (Iterator<Element> itr = stack.descendingIterator(); itr.hasNext(); ) { Element element = itr.next(); if (element.getName().equals(name)) { while (stack.removeLast() != element) {} break; } } }