refactor touse only jtidy/org.w3c.dom for html parsing