Android blog garden client (5) view comments and search bloggers, android view comments
Project address: https://github.com/ZhangTingkuo/AndroidCnblogs
1. view comments
// Get the article comment public static final String BLOGS_COMMENTS = "comment}"; // get the News Comment public static final String NEWS_COMMENTS = comment };
<Entry> <id> 2651327 </id> <title type = "text"/> <published> 2013-04-07T18: 06: 24 + 08: 00 </published> <updated> 2014-09-10T15: 14: 10Z </updated> <author> <name> Panasonic waistband </name> <uri> http://home.cnblogs.com/u/360988/ </uri> </author> <content type = "text"> ah... </Content> </entry> <id> 2652650 </id> <title type = "text"/> <published> 2013-04-09T09: 56: 48 + 08: 00 </published> <updated> 2014-09-10T15: 14: 10Z </updated> <author> <name> john23.net </name> <uri> http://home.cnblogs.com/u/64521/ </uri> </author> <content type = "text"> thanks for sharing </ content> </entry>
2. Search for bloggers
Search for a blogger. If you enter Chinese characters, you need to perform transcoding in English. There is no difference before and after transcoding.
Http://wcf.open.cnblogs.com/blog/bloggers/search? T = {TERM} 2. Just as the first 3 http://wcf.open.cnblogs.com/blog/bloggers/search? T = % E8 % 8B % A5 % E3 % 80% 82% E5 % 8F % AA % E5 % A6 % 82% E5 % 88% 9D % E8 % A7 % 81
try { authorName = URLEncoder.encode(authorName, "utf-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } path = path.replace("{TERM}", authorName);
The XML format is the same as the XML format of the recommended blogger. Therefore, you do not need to re-write Handler and Adapter.
1 <entry> 2 <id>http://www.cnblogs.com/jillzhang/</id> 3 <title type="text">Robin Zhang</title> 4 <updated>2012-04-04T19:30:55+08:00</updated> 5 <link rel="alternate" href="http://www.cnblogs.com/jillzhang/"/> 6 <blogapp>jillzhang</blogapp> 7 <avatar>http://pic.cnblogs.com/face/12311/20140902133806.png</avatar> 8 <postcount>290</postcount> 9 </entry>10 11 <entry>12 <id>http://www.cnblogs.com/JimmyZhang/</id>13 <title type="text">Jimmy Zhang</title>14 <updated>2014-09-10T11:15:32+08:00</updated>15 <link rel="alternate" href="http://www.cnblogs.com/JimmyZhang/"/>16 <blogapp>JimmyZhang</blogapp>17 <avatar>http://pic.cnblogs.com/face/u24804.jpg?id=30073100</avatar>18 <postcount>83</postcount>19 </entry>