我正在使用jsoup 1.7.3编辑一些HTML文件。
我需要从HTML文件中删除以下标签:
你建议什么?
我需要从HTML文件中删除以下标签:
<meta name="GENERATOR" content="XXXXXXXXXXXXXX">
<meta name="CREATED" content="0;0">
<meta name="CHANGED" content="0;0">
正如您所见,这是一个标签,我该怎么做呢?以下是我迄今为止尝试过的方法:
//im pretty sure that the <meta> tag is nested in the <header>
but removing the whole header is bad practice.
Document docsoup = Jsoup.parse(htmlin);
docsoup.head().remove();
你建议什么?