Update:- Seems like I have to give the URL which is returning me the xml. Here it is - URL
I am getting SAXParseException when parsing an xml.
I recommend abandoning the sax parser and using the Android officially supported XMLPullParser. Sax parser is not supported after Android Gingerbread (2.3.3)
The problem was in the encoding. The following answer explains it properly -
https://stackoverflow.com/a/2869127/1079901
I just have to call this regex on the response string -
response = response.replaceAll("[^\\x20-\\x7e]", "");
Thanks to BalusC for such a perfect answer.
If the XML contains Unicode characters such as arabic or Persian letters, StringReader
would make an exception. In these cases, pass the InputStream straightly to the Document object
I would recommend trying to incorporate some XSD validation in your program before you run it through your code.
The following may help you in your efforts: