Hmm. I would consider using the SAX parser, and creating a custom handler to handle the xml. I think i made that suggestion in one of your previous posts.
SAX is generally acknowledged as the faster option than PULL. Not only is the above code very difficult to decipher, but it will make maintenance very painful. You should have a distinct class that is nothing but the handler, and walks though the file triggering events as it goes. I haven't read through, but this article parses an RSS feed using SAX. I suggest you have a look and implement a similar architecture to your project. http://www.helloandroid.com/node/110 On Oct 15, 3:51 pm, Stefan <[email protected]> wrote: > I have forgot the gpx/xml-file: > <?xml version="1.0" encoding="utf-8"?> > <gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://www.topografix.com/GPX/1/1" version="1.1" > creator="Stefan Dahmen" > xsi:schemaLocation="http://www.topografix.com/GPX/1/1http://www.topografix.com/GPX/1/1/gpx.xsd"> > <wpt lat="50.886021852493286" lon="6.5963780879974365"> > <desc value="hhhhh"/> > </wpt> > <wpt lat="50.886054039001465" lon="6.5949565172195435"> > <desc value="zzzzzzz8"/> > </wpt> > <wpt lat="50.88499188423157" lon="6.595224738121033"> > <desc value="yyyyy"/> > </wpt> > <wpt lat="50.8851957321167" lon="6.5965336561203"> > <desc value="xxxx"/> > </wpt> > <trk> > <name>HUHU</name> > <trkseg> > <trkpt lat="50.88498115539551" lon="6.59727931022644"> > </trkpt><trkpt lat="50.88498115539551" lon="6.59727931022644"> > </trkpt><trkpt lat="50.88498651981354" lon="6.59727931022644"> > </trkpt><trkpt lat="50.88498651981354" lon="6.59727931022644"> > </trkpt><trkpt lat="50.88498651981354" lon="6.597273945808411"> > ............ > </trkpt></trkseg> > </trk> > </gpx> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

