freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

web-harvest相關(guān)的代碼-資料下載頁(yè)

2025-08-27 20:37本頁(yè)面

【導(dǎo)讀】("自由人線路沒有搜到結(jié)果!

  

【正文】 pping class name= table=hotel schema=public id name=id type= column name=id / generator class=increment/generator /id property name=hotelName type= column name=hotel_name length=100 notnull=false / /property property name=hotelStar type= column name=hotel_star length=50 notnull=false / /property property name=hotelAddress type= column name=hotel_address length=100 notnull=false / /property property name=hotelTelephone type= column name=hotel_telephone length=50 notnull=false / /property property name=hotelNum type= column name=hotel_num length=50 notnull=false / /property /class /hibernatemapping 接著是改進(jìn)版的 JAVA文件: 這樣就能循環(huán)地讀取 幾個(gè)結(jié)構(gòu)化的 XML 文件并把它們保存到數(shù)據(jù)庫(kù)里面了! import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 public class HotelTest { public OperateCity oc = new OperateCity()。 public void QueryPath(int num) { try{ ScraperConfiguration config = new ScraperConfiguration(examples/)。 Scraper scraper = new Scraper(config, examples/output)。 (page_num, new String(+num))。 (true)。 long starttime = ()。 ()。 long endtime = ()。 (Spent time:+(endtime starttime))。 saveHotel(num)。 } catch(Exception e) { ()。 } } public void getContent(int pageNum) { for(int i=1。i=pageNum。i++) { QueryPath(i)。 } } public String ReadXMLFile(String filename) { String tmp = 。 String str = 。 try { SAXReader saxReader = new SAXReader()。 Document document = (new File(filename))。 List childNodes = (/root )。 int count = 0。 for (Object obj:childNodes) { Element hotelNode = (Element)obj。 Iterator iter = ()。 while(()) { Element element = (Element)()。 Iterator iterator = ()。 while(()) { Element ele = (Element)()。 tmp = ()。 if(()) { tmp = 暫時(shí)沒數(shù)據(jù) ...。 } str += tmp+,。 } } } if(() 1) return (0, ()1)。 else return str。 } catch (Exception ex) { ()。 } return str。 } public void saveHotel(int page) { String str = ReadXMLFile(examples/output+/hotel_page+page+.xml)。 String[] arr = (,)。 (搜到記錄 :========================++條 )。 if( 1){ for(int i=0。i。i+=5) { Hotel h = new Hotel()。 ((arr[i]))。 (arr[i+1])。 (arr[i+2])。 (arr[i+3])。 (arr[i+4])。 (h)。 } } else { (酒店沒有搜到結(jié)果 !)。 } (結(jié)束 ...)。 } /** * @param args */ public static void main(String[] args) { // TODO Autogenerated method stub new HotelTest().getContent(4)。 }
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1