Hi, 475 KB of xml is kind of heavy for a mobile platform.
I don't know a proper way to solve your problem so I can only offer what I would do if I had to stick with xml. I would try to split the file and import it into smaller chunk. You can also try to use JSON instead of XML which would reduce by a great amount the size of your file. Beside it is said that JSON Parser is less costly than the XML one. Yahel On 6 avr, 10:35, hiwa <[email protected]> wrote: > Please any ideas is welcomed > > On Apr 5, 12:37 pm, hiwa <[email protected]> wrote: > > > > > Hi guys, I am rather new to android. I have been searching the web at > > least for two weeks now and I still have not been able to find an > > answer for my problem. > > avd 1.6 > > avd 2.0 > > eclipse > > res/xml/filename.xml has a size of 475KB > > > I am trying to use the > > Resources res = this.getResources(); > > XmlResourceParser xpp = res.getXml(R.xml.file); > > int counter = 0; > > int eventType = xpp.getEventType(); > > while (eventType != XmlPullParser.END_DOCUMENT) { > > if(eventType == XmlPullParser.START_TAG) { > > if(xpp.getName().equals("question")){ > > counter++; > > } > > } > > eventType = xpp.next(); > > }//eof-while > > > that is the code which I am trying to run, the log shows "Data exceeds > > UNCOMPRES_DATA_MAX" message. Could anyone please tell me the solution > > for this, I do not want to go for a database solution or a web app > > service if I can stick with xml. > > > many thanks -- 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 To unsubscribe, reply using "remove me" as the subject.

