The raw stream will not be useful, since it has been pre-compiled into a binary format.
On Thu, May 20, 2010 at 8:07 PM, Nathan <[email protected]> wrote: > 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]<android-developers%[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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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

