Ok i've solved with you suggest.

Is there a widget to get a file?

On Oct 26, 3:59 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Premier wrote:
> > I used XMLPullParser, but in this way i can't parse the file two
> > times.
>
> Yes you can.
>
> > XmlPullParser xpp= ctx.getResources().getXml(R.xml.file);
> > XmlDeserializer xmlDeserializer= new XmlDeserializer(xpp);
>
> > List<BeanA> listOfBeanA=
> > (List<BeanA>)xmlDeserializer.deserialize(BeanA.class);
> > List<BeanB> listOfBeanB=
> > (List<BeanB>)xmlDeserializer.deserialize(BeanB.class);
>
> First, don't do it that way. Make exactly ONE pass through the XML, not
> several.
>
> If you wish to make several passes anyway, get a fresh XmlPullParser
> before doing the second bean.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to