Saturday, January 5, 2013

Android SAX parser some tag text not getting full



Android SAX parser some tag text not getting full





While parsing Huge KML  data using Sax parser some tag text not getting full . When I use below code.


public void characters(char ch[], int start, int length) {
 String chars = (new String(ch).substring(start, start + length));
}
Instead of i used this code .Parsing every tags.

public void characters(char[] ch, int start, int length)throws SAXException {
          if (stringBuild != null) {
            for (int i=start; i<start+length; i++) {
                   stringBuild.append(ch[i]);
            }
        }
    }

Check out this may be help you

Related Posts Plugin for WordPress, Blogger...