OK, got SAX working nicely thanks.

All I need to do now is work out how to loop for multiple tags the
same, e.g. all the 'name's

<startoffile>
  <name>bob</name>
  <name>jim</name>
  <name>jon</name>
  <name>frank</name>
</startoffile>


as I'm only getting bob.


The code I'm using :

                URL url;
                try {
                        url = new URL(strURL);

                //BufferedReader rd = new BufferedReader(new
InputStreamReader(url.openStream()));

                SAXParserFactory spf = SAXParserFactory.newInstance();
        SAXParser sp = spf.newSAXParser();
        XMLReader xr = sp.getXMLReader();
        ExampleHandler myExampleHandler = new ExampleHandler();
        xr.setContentHandler(myExampleHandler);
        xr.parse(new InputSource(url.openStream()));
        ParsedExampleDataSet parsedExampleDataSet =
myExampleHandler.getParsedData();
        return parsedExampleDataSet.toString();

                } catch (Exception e) {
                        return e.getMessage();
                }

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to