原帖由 thinkpanda 於 2008-12-23 12:51 AM 發表 
nekoHTML
trying this parser but I found a problem
String html="<html><head><title>test</title></head><body><a href="xx">aa</a></body>";
InputSource i = new InputSource(new StringReader(html));
DOMParser parser = new DOMParser();
try {
parser.parse(i);
} catch (Exception ex) {
ex.printStackTrace();
}
Document document = parser.getDocument();
Node body = document.getElementsByTagName("A");
System.out.println(body.getLength());
But the result obtain is 0
there should be many hyperlink  |