Hi folks,
I'd like to use the parser API for some pretty straightforward html file
parsing, but when I try your simple example (although I did have to change
Enumeration to HTMLEnumeration)...
public static void main(String[] args) {
try{
System.out.println("testpoint 0");
HTMLParser parser =
new HTMLParser("http://www.yahoo.com");
//HTMLParser parser =
// new HTMLParser("http://www.yahoo.com",new DefaultHTMLParserFeedback());
System.out.println("testpoint 1");
System.exit(0);
// In this example, we are registering all the common scanners
parser.registerScanners();
for (HTMLEnumeration e = parser.elements();e.hasMoreNodes();) {
HTMLNode node = (HTMLNode)e.nextHTMLNode();
node.print();
}
}
catch (Exception e) {
System.out.println("Exception Thrown:" + e.getMessage() + " : " + e);
e.printStackTrace();
}
System.out.println("Done! yay");
}
I get
NoClassDefFoundError: sun/security/action/GetPropertyAction
What am I doin wrong?
Thanks,
Lou
|