title: XML - Extract One tag Value
body: <p>I have to extract tag value from an xml Document that contains a single tag like below: </p>
  
  <pre><code>&lt;error&gt;Permission denied&lt;/error&gt;
  </code></pre>
  
  <p>i have tried: </p>
  
  <pre><code>String xmlRecords = "&lt;error&gt;Permission denied&lt;/error&gt;"
  DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  DocumentBuilder db = dbf.newDocumentBuilder();
  InputSource is = new InputSource();
  is.setCharacterStream(new StringReader(xmlRecords));
  Document doc = db.parse(is);
  Node nodes = doc.getFirstChild();
  String = nodes.getNodeValue();
  </code></pre>
  
  <p>but it dont works.
  How can i do it ?</p>