2010-08-05 31 views
0

如何使用JRex访问页面源代码?如何使用JRex获取页面源代码?

+0

当然,我会去接受所有的答案,只是因为他们在那里 - 因为我参加了斗争,所以我应该只接受那些是正确的...... – 2010-08-16 18:34:51

回答

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 
相关问题