我正在从 ftp 下载一个 xml 文件并使用以下代码进行存储:
FileOutputStream stream = openFileOutput("emp.xml", MODE_WORLD_WRITEABLE);
cd = ftp.retrieveFile("emp.xml", stream);
我想稍后读取此文件以在我的应用程序中解析。以前我使用此代码,因为我将其存储在 res/xml 文件夹中:
XmlResourceParser parser = this.getResources().getXml(R.xml.employees);
我应该如何替换上面的代码来获取 emp.xml 文件。提前致谢!