如何连接在Android code XML? [英] How to encode XML on Android?

查看:123
本文介绍了如何连接在Android code XML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要带code。将XML文档转换成将通过一个XML解析器作为字符串(即带标签)的格式。然后,我需要再次去code它,我必须这样做在Android上。那是什么我要找的?

I need to encode an XML document into a format that will pass through an XML parser as a string (i.e. strip tags). I then need to decode it back again and I need to do this on Android. What is the library/class in the Android API that I'm looking for?

感谢

推荐答案

我最终使用URLEn codeR / URLDe codeR,这似乎很好地工作。

I ended up using URLEncoder/URLDecoder, which seems to work nicely.

String encoded = URLEncoder.encode(xml);

这篇关于如何连接在Android code XML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆