替换android中收到的Html响应的文本
我已经从服务器获得了 Html 响应,并将其存储在名为“response”的字符串变量中。现在我想扫描该字符串变量并从该字符串中获取选定的标签,然后将它们添加到另一个字符串中并显示它们。
有人告诉我有关更换字符串的信息,但我不知道。
谁能告诉我我该怎么做那件事?
谢谢, 大卫
I have got the Html response from the server that I have stored in a string variable named "response" Now I want to scan that string variable and take the selected tags from that string and add them to another string and display them.
Somebody told me about the string replacement but I don't have an idea.
Can anybody tell me how can I do that thing?
Thanks,
david
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以从响应中获取子字符串并将其附加到您的字符串中。请参阅
http://developer.android.com/reference/java/lang/String .html
祝你好运
jse
You can get the sub string from the response and append to your string. Please see
http://developer.android.com/reference/java/lang/String.html
Good Luck
jse
我认为 android-spring 插件可以帮助你解决这个问题,
这里服务器响应可以很容易地转换为Java对象(Plain old Java Object)。
请通过链接
http://static.springsource.org /spring-android/docs/1.0.x/reference/html/rest-template.html
I think the android-spring plug-in can help u on that problem,
here the server response can be easily converted to Java object(Plain old Java Object).
please go through the link
http://static.springsource.org/spring-android/docs/1.0.x/reference/html/rest-template.html