title: Problem when parsing xml string in java
body: <p>I'm writing an android application, and I would like to get an xml string from web and get all info it contains.
  First of all, i get the string (this code works):</p>
  
  <pre><code>
  URL url = new URL("here my adrress");
  BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
  String myData = reader.readLine();
  reader.close();
  </code></pre>
  
  <p>Then, I use DOM:</p>
  
  <pre><code>
  DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  DocumentBuilder db = dbf.newDocumentBuilder();
  InputSource is = new InputSource();
  is.setCharacterStream(new StringReader(myData));
  </code></pre>
  
  <p>Still no problem. When I write</p>
  
  <pre><code>
  Document doc = db.parse(is);
  </code></pre>
  
  <p>the application doesn't do anything more. It stops, without errors.
  Can someone please tell me what's going on?</p>