我如何能解析我的本地XML文件位于我的Android项目(内RES / XML文件夹),并希望得到该文件中的值。
How can I parse my local XML file located in my android project (inside res/XML folder) and want to get the values in that file.
要访问存储在 RES / XML
XML资源,调用getResources().getXml()从任何活动
或其他上下文
。您需要提供给的getXML()
的XML的ID来加载( R.xml.myfile
)。
To access XML resources stored in res/xml
, call getResources().getXml()
from any Activity
or other Context
. You need to supply to getXml()
the ID of the XML to load (R.xml.myfile
).