This will work to get a parser: XmlResourceParser xpp = getResources().getXml(R.xml.file_name);
To get an underlying stream, you might be able to use openRawResource or get the AssetManager to get to the input streams. getResources.getAssets().getInputStream(fileName) I haven't tried it but its worth a try. Nathan On May 16, 7:59 pm, tiany <[email protected]> wrote: > I know when the xml file is under /res/raw,I can do this by > context.getResources().openRawResource(rid); but when the xml file is > under /res/xml,how can I do it? > > thx in advance > > tiany > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

