private void parseHCard(Element element, Person author) { NodeList nodeList = element.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { Element child = (Element) node; if (hasClass(child, "fn")) { author.setName(child.getTextContent()); String href = child.getAttribute("href"); if (href.startsWith("mailto:") && (author.getEmail() == null)) { author.setEmail(href.substring(7)); } } else if (hasClass(child, "n")) { author.setName(child.getTextContent()); } else if (hasClass(child, "email")) { author.setEmail(child.getTextContent()); } else { parseHCard(child, author); } } } } }