title: Premature end of file error when building DOM document object
body: <p>When I create the Document object I encounter a premature end of file error. This code was working a few days ago and I'm unsure of what is causing it to throw an error now.</p>
  
  <pre><code>DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  DocumentBuilder builder = factory.newDocumentBuilder();
  InputSource is = new InputSource(new StringReader(response));
  Document doc = builder.parse(is);
  </code></pre>
  
  <blockquote>
    <p>[Fatal Error] :1:1: Premature end of file.</p>
  </blockquote>
  
  <p>Here is the response xml I am receiving. It looks perfectly fine.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;soap:Body&gt;
          &lt;GetBatchFilesResponse xmlns="http://...."&gt;
              &lt;GetBatchFilesResult&gt;
                  &lt;BatchFile&gt;
                      &lt;Uri&gt;someURI&lt;/Uri&gt;
                      &lt;ID&gt;2025961&lt;/ID&gt;
                      &lt;FQName&gt;someFileName&lt;/FQName&gt;
                  &lt;/BatchFile&gt;
              &lt;/GetBatchFilesResult&gt;
          &lt;/GetBatchFilesResponse&gt;
      &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>