Tommy wrote: > Hi this might be a stupid question but I can't figure out how to do > this. I am trying to put an XML file containing over 1,000 different > fish into my app so that I can read this file, create an Array and > attach that to the AutoCompleteTextView. I first tried to create a > string-array in a resource file but apparently the array was to large > and would never actually load anything after a certain number of > values. So want I want to do is add that XML file to a place in my app > that I can access it and read from it. Whenever I try to bring the XML > file in I get all these errors in Eclipse. So how do I add this file > and how do I reference it later in order to access it? I could just > store it online and access it that way but I think it is a little bit > of a waste to have to access the net for that if I can instead just > add it to my package setup someplace.
Put it in res/xml/. Then, access it via a Resources object (getResources() from an activity). Resources has getXml() to return you an XmlPullParser on your XML. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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

