我有這樣一行文字:的Android HTTPGET
id:1234 dateandtime: 03/10/2011 14:30 firstnumber:2222 secondnumber:3333 centernumber: 4444
refrancenumber:5555 webaddress: www.example.com
而且我使用此代碼讀取它關閉我的網站,我有測試
//Encode and set entity
postMethod.setEntity(new UrlEncodedFormEntity(nameValuePairs, HTTP.UTF_8));
//Execute and get the response - remove all html tag
addressString = hc.execute(postMethod, res).replaceAll("<(.|\n)*?>","");
我的問題是,這個代碼把它讀成一個段落我想將它們分開,所以我可以將它們中的每一個在自己的列在SQLite數據庫。
注:1234
,03/10/2011 14:30
,2222
,3333
,4444
,5555
和www.example.com
每個將被存儲在一個單獨的源碼柱。
有什麼建議嗎?
我推薦使用JSON結構。 – Olsavage 2011-03-09 16:29:04