You will have to sort your data once you get it. You can't control the order it's processed. If you know for a fact that it will only be 4 items, you could create an array of size 4, then stick the data in the specific index spot of the array. Or you can add it to a list then sort it. That is an odd XML tho. I've not seen xml return something like that...are you responsible for the XML being returned, or have no control over it?
On Mon, Feb 1, 2010 at 2:26 AM, Sasikumar.S <sasikumar.it1...@gmail.com>wrote: > Thank U for responding previous Questions. > > One more thing Guys. > > Now i'm getting one more doubt in that. > > I need to parse the below XML file: > > <item> > <2>2item</2> > <3>3item</3> > <1>1item</1> > <4>4item</4> > </item> > > In that i'm fetching data from <1>, <2>,<3> & <4>. > But i'm getting value as <2>, <3>, <1> & <4> in order wise. > > How to get in my wish order?. > > Please give some idea guy?.. > > > On Mon, Feb 1, 2010 at 10:29 AM, Frank Weiss <fewe...@gmail.com> wrote: > >> SAXParser does NOT parse line by line. That's incorrect. What you need is >> something like this: >> >> @Override >> public void characters(char[] ch, int offset, int count) { >> sb.append(ch, offset, count); >> } >> @Override >> public void endElement(String namespaceUri, String localName, String >> qName) { >> if (localName.equals("title")) >> title = sb.toString(); >> >> >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > -- > Thanks & Regards > Sasikumar.S > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en