我一直在关注使用 HtmlCleaner 解析 HTML 的教程,特别是这个:http: //xjaphx.wordpress.com/2012/02/04/android-xml-adventure-parsing-html-using-htmlcleaner/
有一部分代码获取了一个 url 并修改了该页面的 html:
HtmlCleaner htmlCleaner = new HtmlCleaner();
CleanerProperties props = htmlCleaner.getProperties();
props.setAllowHtmlInsideAttributes(false);
props.setAllowMultiWordAttributes(true);
props.setRecognizeUnicodeChars(true);
props.setOmitComments(true);
URL url = new URL(incommingURL);
TagNode root = htmlCleaner.clean(url);
Object[] statsNode = root.evaluateXPath(incommingXPath);
如何正确保存网页,将其存储为资产并实现相同的目标?
谢谢