1. res/raw下:
InputStream is = getResources().openRawResource(R.id.xxx);
2.res/xml下:
XmlResourceParser xmlResourceParser = getResources().getXml(R.xml.xxx);
3.src/下:
InputStream is = getClass().getClassLoader().getResourceAsStream("xxx.xml");
4.assets/下:
AssetManager assets = getAssets();
InputStream is = assets.open("xxx.xml");