Node childNode = node.getFirstChild();
HTMLCleanupHandlerFactory factory = HTMLCleanupHandlerFactory.getInstance();
while (childNode != null) {
// cleanup this child node
IStructuredCleanupHandler cleanupHandler = factory.createHandler(childNode, getCleanupPreferences());
childNode = cleanupHandler.cleanup(childNode);
// get new parent node
parentNode = childNode.getParentNode();
// get next child node