Ok so I want to put a custom static xml file into my application so that I can easily pull data from it. The problem I am facing is that every time I try to add an xml file to res/values/ I get invalid start tag, I would really love to use my own tags and not be forced to use things like <resources> and <item>. Do I have to store this in a separate location if I want to use these custom tags, or am I just screwed out of doing this.
<?xml version="1.0" encoding="utf-8"?>
<sports>
<men>
<sport>
<name>Baseball</name>
<code>baseball</code>
</sport>
</men>
<women>
</women>
</sports>
Thanks in advance
For static xml files like this, you need to put them in the “raw” or “xml” folder under the “res” directory. That way Android doesn’t try to parse it. You can read more about it here in the Android docs. http://developer.android.com/guide/topics/resources/providing-resources.html