我有这样一行文字:的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