如何使用JRex访问网页源代码?
答案 0 :(得分:0)
//WebNavigation navigation = null;
//URI uri = null;
navigation.loadURI(uri, WebNavigationConstants.LOAD_FLAGS_NONE, null, null, null);
Document doc = navigation.getDocument();
Element ex = doc.getDocumentElement();
System.out.println(ex.getTextContent()); //prints page source