// not a doc tag or xml
if (!stack.isEmpty()) { // we found the closing tag before
String closedName = (String) stack.peek();
if (closedName.equalsIgnoreCase(doc.substring(offset + 1, offset + 1
+ closedName.length()))) {
stack.pop();
continue;
}
} else {
if (parentEndTagReached) {
return new int[] {offset + 1, lastSpaceIndex};