开发者

How can I write android binary XML from Android App?

I've got an app that pulls XML from the Web, and caches it locally. As parsing XML is expensive compared to parsing Android binary XML, I'd like to store my local copy as Android binary XML. I haven't spotted an API for creating Android binary XML on the fly though, only the C/C++ code used by AAPT.

My motivation for taking this approach is that I don't currently use all the XML values/attributes, but may want to use more of them in a future version of m开发者_如何学编程y app, and don't want to download all the XML data again.

Can someone point me at the right bits of the API to create Android binary XML at run-time?

Many thanks,

Phil Lello


Android binary XML is faster because it is optimized by the compiler. In runtime, you can't create binary XML without having an implementation of the compiler to do it for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜