Question

Is there any way to parse an XML string using Android SAX?

Was it helpful?

Solution

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());
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top