我爱编程

读取XML数据

2015-04-24  本文已影响33人  几千里也

Q: How to read data from an xml file in xml folder of resources, in Android application?
A: Use XMLResource parser to read the resource file, and parse it.

Description:
For pulling data from an XML file which is stored in xml folder or resources, then we have to use XMLResourceParser.

XmlResourceParser xp = getResources().getXml(R.xml.myfile);
上一篇 下一篇

猜你喜欢

热点阅读