+1 for XmlPull.  I tried giving SAX a go but had so many issues structurally
with how I organized my code.  XmlPull gives you a more "serial" approach
and makes it easier to integrate, while providing an enormous performance
boost over DOM.

--
Chris Stewart
http://chriswstewart.com

Fantasy 
Football<http://chriswstewart.com/android-applications/fantasy-football/>-
Android app for MFL fantasy football owners
Fantasy Football
Insider<http://chriswstewart.com/android-applications/fantasy-football-insider/>-
Android app for all fantasy football fanatics
Social Updater<http://chriswstewart.com/android-applications/social-updater/>-
An easy way to send your status blast to multiple social networks



On Tue, Aug 24, 2010 at 10:57 AM, Paul Turchenko
<[email protected]>wrote:

> Consider using XmlPullParser instead of SAX. It's more convenient for
> the most cases.
>
> On Aug 23, 1:20 pm, Atokarev <[email protected]> wrote:
> > Hi there. I could not get any inner elements during the xml parsing.
> > looks like parser see only outer tag A.
> > Could you show me error?
> >
> > XML:
> > <A>
> > <B b="ab"></B>
> > <C c="ac"></C>
> > <D d="ad"></D>
> > <E e="ae"></E>
> > </A>
> > When i call parse function - only A-tag was processed.
> > Code:
> >
> > App_class
> >
> > ...
> > xr.parse(new InputSource(url.openStream()));
> > ...
> >
> > ExampleHandler:
> > ...
> > if (localName.equals("A"))
> >             {
> > // TODO
> >             }
> >             if (localName.equals("B"))
> >             {
> >                 String a= atts.getValue("b");
> >                 myParsedExampleDataSet.setExtractedB(b);
> >                         values.put("b", b);
> >             }
> >             else if (localName.equals("C"))
> >             {
> >                 int c = Integer.parseInt(atts.getValue("c"));
> >                 myParsedExampleDataSet.setExtractedC(c);
> >                         values.put("c", c);
> >             }
> >             else if (localName.equals("D"))
> >             {
> >                 double d= Double.parseDouble(atts.getValue("d"));
> >                 myParsedExampleDataSet.setExtractedD(d);
> >                         values.put("d", d);
> >             }
> > ...
>
> --
> 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]<android-developers%[email protected]>
> 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 [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

Reply via email to