views:

2333

answers:

1

Hi there!

Is there any way to parse a xml string using Android SAX?

Thanks in advance, Best regards!

+7  A: 

Yes, first define a SAX ContentHandler:

class MyXmlContentHandler extends DefaultHandler {
   ... // implement SAX callbacks here
}

then you can use the Xml utility class:

Xml.parse(xmlString, new MyXmlContentHandler());
Matthias