title: Why some characters are missing when i parse a xml tag using SaxParser?
body: <p>I am parsing a xml response which has almost 90000 characters in my android application using SaxParser. xml looks like following:</p>
  
  <pre><code> &lt;Registration&gt;
       &lt;Client&gt;   
           &lt;Name&gt;John&lt;/Name&gt;
           &lt;ID&gt;1&lt;/ID&gt;
           &lt;Date&gt;2013:08:22T03:43:44&lt;/Date&gt;
       &lt;/Client&gt;  
       &lt;Client&gt;   
           &lt;Name&gt;James&lt;/Name&gt;
           &lt;ID&gt;2&lt;/ID&gt;
           &lt;Date&gt;2013:08:23T16:28:00&lt;/Date&gt;
       &lt;/Client&gt;
       &lt;Client&gt;   
           &lt;Name&gt;Eric&lt;/Name&gt;
           &lt;ID&gt;3&lt;/ID&gt;
           &lt;Date&gt;2013:08:23T19:04:15&lt;/Date&gt;
       &lt;/Client&gt;
  
       ..... 
   &lt;/Registration&gt;
  </code></pre>
  
  <p>sometimes parser misses some characters from Date tag. Instead of giving 2013:08:23T19:04:15 back it gives 2013:08:23T back. I tried to skip all white spaces from response xml string using following line of code:</p>
  
  <pre><code> responseStr = responseStr.replaceAll("\\s","");
  </code></pre>
  
  <p>But then i get following exception:</p>
  
  <pre><code> Parsing exception: org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 16: not well-formed (invalid token)
  </code></pre>
  
  <p>Following is the code i am using for parsing:</p>
  
  <pre><code> try {
              SAXParserFactory factory = SAXParserFactory.newInstance();
              SAXParser saxParser = factory.newSAXParser();
  
              DefaultHandler handler = new DefaultHandler() {
                  public void startElement(String uri, String localName,String qName, Attributes attributes) throws SAXException {
                      tagName = qName;
                  }
  
                  public void endElement(String uri, String localName, String qName) throws SAXException {
  
                  }
  
                  public void characters(char ch[], int start, int length) throws SAXException {
                      if(tagName.equals("Name")){
                          obj = new RegisteredUser();
                          String str = new String(ch, start, length);
                          obj.setName(str);
                      }else if(tagName.equals("ID")){
                          String str = new String(ch, start, length);
                          obj.setId(str);
                      }else if(tagName.equals("Date")){
                          String str = new String(ch, start, length);
                          obj.setDate(str);
  
                          users.add(obj);
                      }
                  }
  
                  public void startDocument() throws SAXException {
                      System.out.println("document started");
                  }
  
                  public void endDocument() throws SAXException {
                      System.out.println("document ended");
                  }
              };
  
              saxParser.parse(new InputSource(new StringReader(resp)), handler);
  
          }catch(Exception e){
              System.out.println("Parsing exception: "+e);
              System.out.println("exception");
  
          }
  </code></pre>
  
  <p>Any idea why is parser skipping characters from a tag and how can i solve this problem. Thanks in advance.</p>