title: Issue Parsing XML Document using SaxParser - 2047 character limit?
body: <p>I have created a class that extends the SaxParser DefaultHandler class. My intent is to store the XML input in a series of objects while preserving the data integrity of the original XML data. During testing, I notice that some of the node data was being truncated arbitrarily on input.  </p>
  
  <p>For example:</p>
  
  <pre><code>Input: &lt;temperature&gt;-125&lt;/temperature&gt;  Output: &lt;sensitivity&gt;5&lt;/sensitivity&gt;
  Input: &lt;address&gt;101_State&lt;/city&gt;             Output: &lt;address&gt;te&lt;/address&gt; 
  </code></pre>
  
  <p>To further complicate things, the above errors occurs "randomly" for 1 out of every ~100 instances of the same XML tags. Meaning the input XML file has roughly 100 tags that contain <code>&lt;temperature&gt;-125&lt;/temperature&gt;</code> but only one of them produces an output of <code>&lt;sensitivity&gt;5&lt;/sensitivity&gt;</code>. The other tags accurately produce <code>&lt;sensitivity&gt;-125&lt;/sensitivity&gt;</code>.</p>
  
  <p>I have overwritten the abstract "characters(char[] ch, int start, int length)" method to simple grab the character content between XML tags:</p>
  
  <pre><code>public void characters(char[] ch, int start, int length)
              throws SAXException {
  
              value = new String(ch, start, length);
  
              //debug
              System.out.println("'" + value + "'" + "start: " + start + "length: " + length);
          }
  </code></pre>
  
  <p>My println statements produce the following output for the specific temperature tag that results in erroneous output :</p>
  
  <pre><code>&gt; '-12'start: 2045length: 3 '5'start:
  &gt; 0length: 1
  </code></pre>
  
  <p>This tells me that the characters methods is being called twice for this specific xml element. It is being called once for all other xml tags.  The "start" value of the secong line signifies to me that the char[] chars is being reset in the middle of this XML tag. And the character method is being called again with the new char [].</p>
  
  <p>Is anyone familiar with this issue? I was wondering if I was reaching the limit of a char []'s capacity. But a quick query renders this unlikely. My char [] seems to be resetting at ~ 2047 characters</p>
  
  <p>Thanks,</p>
  
  <p>LB</p>