if (propertiesStream != null) {
propertiesStream.close();
}
}
TidyParser tidyParser = new TidyParser(tidyProperties);
Document parsedHtml = tidyParser.parseHtmlByTidy(new StringReader(string), null);
NodeList nodeList = parsedHtml.getDocumentElement().getChildNodes();
Node bodyNode = nodeList.item(nodeList.getLength() - 1);
NodeList bodyChildren = bodyNode.getChildNodes();
int bodyChildrenLength = bodyChildren.getLength();