Skip to content Skip to sidebar Skip to footer

Parse XML String Using SAX

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

Solution 1:

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());

Post a Comment for "Parse XML String Using SAX"