日期:2014-05-20 浏览次数:20692 次
<html> <head> <title>DOM Tutorial</title> </head> <body> <h1>DOM Lesson one</h1> <p>Hello world!</p> </body> </html>
String jlu= "http://127.0.0.1:8080/node.html"; try{ Parser parser = new Parser(jlu); for(NodeIterator it = parser.elements(); it.hasMoreNodes();){ Node node = it.nextNode(); System.out.println(node.getText()); } }catch(Exception e){ System.out.println(e.getMessage()); }