電話に保存されている html ファイルがあり、HtmlCleaner でクリーンアップして出力結果を確認したいと考えています。これが私のコードです:
public void cleanHtml() throws IOException{
HtmlCleaner cleaner = new HtmlCleaner();
CleanerProperties props = cleaner.getProperties();
TagNode node = cleaner.clean(htmlToClean);
new PrettyXmlSerializer(props).writeToFile(node, "4c.xml");
}
これは何もしません。携帯電話のどこかに .xml またはクリーンアップされた .html ファイルを表示したいです。
これは htmlToClean 変数です:
htmlToClean = new File(Environment.getExternalStorageDirectory().getPath() + "/Android/data/com.whizzapps.stpsurniki/4c.html");