From the last 2 days I am searching that how to parse XML with special chars like !@#$%^&*()\':;\", but I am not getting anything sufficient that how to implement it.. Can a
public void XmlParsing(String questions_xml)
{
try {
/** Handling XML */
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();
/** Create handler to handle XML Tags ( extends DefaultHandler ) */
MyXmlHandler myXMLHandler = new MyXmlHandler();
xr.setContentHandler(myXMLHandler);
xr.parse( new InputSource(new StringReader(questions_xml)));
} catch (Exception e) {
String err = (e.getMessage()==null)?"XMLParsing exception":e.getMessage();
Log.e("XMLParsing Exception",err);
}
}
now when I am trying to parse & then my app crashes?