public int walk(Element el) { Elements children = el.children(); String tagName = el.tagName().toLowerCase(); if (tagName.matches("h[1-6]")) { secIndex++; String secName = el.text(); String key = "SectionTitle" + "/" + title + "/" + hash + "/" + new Integer(secIndex).toString(); String value = secNameFilter(secName); dataStore.put(key, value); } for (Element child : children) { secIndex = (new Walker(secIndex)).walk(child); } return secIndex; }