l********r 发帖数: 140 | 1 Hi,
I am using HTMLEditorKit trying to parse a html.
My purpose is to get the text content of a HTML file, and also the URLs
in this HTML file. But how can I do it?
I saw a demo file looks like (where r is the html file):
HTMLEditorKit.Parser parser;
System.out.println("About to parse " + spec);
parser = new ParserDelegator();
parser.parse(r, new HTMLParseLister(), true);
The above code output everything to screen. I think I should replace
the "new HTMLParseLister |
|