Now it will throws an Exception ==>> org.xml.sax.SAXParseException:
Unexpected token (position:TEXT SelectResponse{S...@1:1179 in
java.io.StringReader@412b2e10)i will try to solve this exception but it will not be solved..... If i run this same code on android 2.2 it will works fine...... On Thu, May 17, 2012 at 7:37 AM, Jonathan S <[email protected]> wrote: > Which errors? > > > On Wednesday, May 16, 2012 6:24:29 AM UTC-4, Bhaumik Thaker wrote: >> >> >> Hello All, >> >> i have a problem i have parse the data using DOM parser in >> android 2.2 but it will not work in higher version of 2.2. >> I have use the khop to fetch the response from webservice... >> >> It will write the code as follows... >> >> DocumentBuilderFactory factory = DocumentBuilderFactory.** >> newInstance(); >> //factory.setCoalescing(true); >> try{ >> //InputStream is = new >> ByteArrayInputStream(sb.**toString().getBytes()); >> //sb.toString() is the Data which is comes from the webserver as a response >> InputSource instream = new InputSource(); >> instream.setEncoding("UTF-8"); >> String strnm = sb.toString(); >> //instream.setByteStream(new ByteArrayInputStream("<table><** >> uid>250</uid></table>")); >> instream.setCharacterStream(**new StringReader(strnm)); >> DocumentBuilder db = factory.newDocumentBuilder(); >> Document doc = db.parse(instream); >> } >> >> it will throws an error at following..... >> >> Document doc = db.parse(instream); >> >> This will work fine in android 2.2 but not in 2.3 or higher version... >> >> >> >> Help me to solve this issue... >> >> Thanks, >> -- >> Bhaumik Thaker >> > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Bhaumik Thaker -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

