I have an xml file under res folder, the structure is res/raw/myfile.xml. Now i am using JDOM for parsing the file using SAXBuilder.build(“raw/myfile.xml”);
And in Logcat it is showing that it cannot open the file.
How can I achieve this? any suggestions?
I have an xml file under res folder, the structure is res/raw/myfile.xml. Now i
Share
This is how you parse a raw resource called
myfile.xml:Note1 Notice that there is no file extension at the end of
com.YourApp.R.raw.myfile! (so you cannot have two different files with same name)Note2 You cannot make sub folders under raw folder!
Note3 If I remeber correctly, your file name should have all lower case and no spaces!