Hi,

> You can use these events to do whatever you need at any point in the
> document. So once we reach the start  of <trk> we know all waypoints
> have been read right?
>
Yes

> You should call the parser in a background thread so your UI thread
> can respond to a call from the parser when it reaches the marked
> element.
>

Actually, in my "main.java" i have:
getWpt = new Thread (new Runnable ()
{
        @Override
        public void run()
        {
                try
                {
                        FileInputStream is = new 
FileInputStream("/sdcard/"+fileList[pos]);
                        SAXParserFactory factory = 
SAXParserFactory.newInstance();
                        SAXParser saxparser = factory.newSAXParser();
                        XMLReader reader = saxparser.getXMLReader();
                        xmlHandler = new XMLHandler ();
                        reader.setContentHandler(xmlHandler);
                        reader.parse( new InputSource (is) );
                }
......

than i have an own java file for my XMLHandler class. So how could i
use a method like your callNotifyMethodInMainClass(wayPointArray). ??
Must I create a Handler object in my main.java and send the handler
object to my handler class (instead of xmlHandler = new XMLHandler ();
xmlHandler = new XMLHandler (myHandler); ?? If so, how can i send the
wayPointArray back?? I only use myHandler.sendEmptyMessage(0) or
something like that - so how can i pass the waypointArray object
back??


Thanks for your answer,
Stefan

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to