title: Can't parse some xml in java
body: <p>I cannot parse this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
    &lt;response&gt;
       &lt;status&gt;OK&lt;/status&gt;
       &lt;time&gt;2012-12-18 21:55&lt;/time&gt;
    &lt;/response&gt;
  </code></pre>
  
  <p>By code:</p>
  
  <pre><code>InputStream is=sock.getInputStream();
          String sa="";
          int cc;
          while((cc=is.read())!=-1){
              sa+=(char) cc;
          }
  ByteArrayInputStream sr=new ByteArrayInputStream(sa.getBytes());
  DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
  DocumentBuilder db=dbf.newDocumentBuilder();
  Document doc=db.parse(sr);
  </code></pre>
  
  <p><code>sr</code> is the <code>String</code> where this is placed. How can it be possible? when I use <code>doc.getNodeName</code> i get null. </p>