- public class TestRS {
- public static void main(String[] args) {
- TestRS trs = new TestRS();
- trs.praseRsFile();
- }
- //解析在远程共享文件中的html
- public void praseRsFile(){
- try {
- File input = new File("//192.168.18.232/heritrix/index.html");
- Document doc = Jsoup.parse(input,"UTF-8");
- Elements files = doc.body().select("*");
- System.out.println(files);
- } catch (IOException ex) {
- Logger.getLogger(TestRS.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/150720134583.html
来源: http://www.codesnippet.cn/detail/150720134583.html