if (log.isDebugEnabled()) {
log.debug("Parsing html of: " + baseUrl);
}
Parser htmlParser = null;
try {
String contents = new String(html,encoding);
htmlParser = new Parser();
htmlParser.setInputHTML(contents);
} catch (Exception e) {
throw new HTMLParseException(e);
}
// Now parse the DOM tree
try {
// we start to iterate through the elements
parseNodes(htmlParser.elements(), new URLPointer(baseUrl), urls);
log.debug("End : parseNodes");
} catch (ParserException e) {
throw new HTMLParseException(e);
}