Re: [Htmlparser-user] HTML parser for HTML translation
Brought to you by:
derrickoswald
From: Aminudin K. <ami...@mi...> - 2003-02-06 07:13:42
|
Hi, Currently I am testing HTMLParser for my HTML translation engine. FYI, I am using the latest integration module , Version 1.3 dated 3 February, 2003. I had problem when using htmlparser.jar , it couldn't find HTMLVisitor(I mean org.htmlparser.visitors) but it could find HTMLParser. Does this means that HTMLVisitor is not included in the pre-compiled binary that comes along with the integration release ? If recompile is the answer , then I have to learn Ant . Thanks for support :) --------------------Error--------------------------- htmlTrans.java:10: cannot resolve symbol symbol : class visitors location: package htmlparser import org.htmlparser.visitors; ^ htmlTrans.java:17: cannot resolve symbol symbol : class TextExtractingVisitor location: class htmlTrans TextExtractingVisitor visitor = new TextExtractingVisitor(); ^ htmlTrans.java:17: cannot resolve symbol symbol : class TextExtractingVisitor location: class htmlTrans TextExtractingVisitor visitor = new TextExtractingVisitor(); ^ 3 errors ---------------------------------------------------------------------------------------- Below are the codes import java.util.*; import java.io.*; import org.htmlparser.HTMLParser; import org.htmlparser.HTMLRemarkNode; import org.htmlparser.HTMLStringNode; import org.htmlparser.tags.HTMLEndTag; import org.htmlparser.tags.HTMLTag; import org.htmlparser.util.HTMLParserException; import org.htmlparser.visitors; public class htmlTrans { public static void main(String args[]){ try { HTMLParser parser = new HTMLParser("http://www.yahoo.com"); TextExtractingVisitor visitor = new TextExtractingVisitor(); parser.visitAllNodesWith(visitor); }catch (HTMLParserException e){ System.out.println("Error"); } } } |