title: UTF-8 Issue in xml parsing
body: <p>I am using the following codes to convert XML contents to UTF-8, but they are not working properly:</p>
  
  <p>1.</p>
  
  <pre><code>InputStream is = new ByteArrayInputStream(strXMLAlert.getBytes("UTF-8"));
  Document doc = db.parse(is); 
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>InputSource is = new InputSource(new ByteArrayInputStream(strXMLAlert.getBytes()));
  is.setCharacterStream(new StringReader(strXMLAlert));
  is.setEncoding("UTF-8");
  Document doc = db.parse(is);
  </code></pre>