title: parsing a large xml string in java using XMLReader
body: <p>I have the following bit of code which parses an XML string returned from from a database:</p>
  
  <hr>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <p>XMLReader xReader = XMLReaderFactory.createXMLReader();</p>
        
        <p>xReader.setContentHandler(parser);</p>
        
        <p>xReader.parse(new InputSource(new StringReader(<strong>theResponseStringFromTheDatabase</strong>)));</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <hr>
  
  <p>whenever the <strong>theResponseStringFromTheDatabase</strong> is too large, the parsing fails. Is there a way to modify the code so it will parse large strings?</p>
  
  <p>best wishes,
  ck</p>