tags:

views:

107

answers:

1

Hey All, I am trying to get a input stream from something like this.

InputSource myInputSource = new InputSource(activity.getResources().openRawResource(com.MYCLass.R.xml.programs));

myXMLReader.parse(myInputSource);

and then call parse on the parser instance i Created. SOm how i get nothing . Works fine if I use a server XML....

A: 

Put the xml into /res/raw folder. It looks like openRawResource opens resources from that folder only. You can also try getResources().getXml(com.MYCLass.R.xml.programs); which will return you instance of XML parser.

Konstantin Burov