08-30-2012 07:58 AM
The xml data is coming from server.And in Android it's taking 6 sec.But in Blackberry it's taking 15 sec.
I want to know ,is there any fastest parsing techolgy available?They are reading the url line by line and we are i think so character by character.So can we do the same what they are doing? if yes,please tell how?
08-30-2012 08:10 AM
08-30-2012 08:48 AM
08-30-2012 08:51 AM
use IoUtility.streamtobyte(input stream); method to convert input stream to btye array, and then use String str = new String(byte array);
hope this will work for you!
08-30-2012 09:18 AM
Once you have the data in a byte array, I suggest you leave it there and just package this as a ByteArrayInputStream to feed to your XML parser as a Stream. Then it can decide if the XML has been encoded using UTF-8 or whatever as appropriate.
At one time, I compared the speed of the supplied XML parser (using SAX) with one we had written, and our one processed twice as fast. Similarly I suspect kXML will be faster than the built-in one too. But in my experience, the parsing time is typically not significant when compared with the download time.