2

我希望能够使用 Jericho 解析两个评论标签之间的任何和所有文本。例如,

<!--start-->
abc
123
<!--end-->

会回来

abc
123

这有可能吗?

4

1 回答 1

0

http://jericho.htmlparser.net/docs/index.html -> Html 评论 -> http://jericho.htmlparser.net/samples/console/src/FindSpecificTags.java ->

(...)
System.out.println("HTML Comments:");
displaySegments(source.getAllTags(StartTagType.COMMENT));
(...)
于 2012-05-29T10:30:10.107 回答