title: How to read special characters like \n from XML file in Java?
body: <p>In my XML I have</p>
  
  <blockquote>
    <p>&lt;'nodeName'>separator=\n &lt;'/nodeName'></p>
  </blockquote>
  
  <p>I am using DOM Parser to parse the XML. When I read the Value in Java Code, I am getting the value as <strong>\n</strong>. It is not treated as line break but instead a Character(\n).</p>
  
  <p>I am very new to XML Parsing and so I am not sure that what has to be done to get the value as <strong>line break</strong> instead of a character <strong>\n</strong></p>
  
  <p>Adding few lines from my code. Sorry I cannot add complete code but I hope my question is clear and below lines of code can add some extra light to it.</p>
  
  <pre><code>DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
  Document doc = dBuilder.parse(file);                
  XPath xPath = XPathFactory.newInstance().newXPath();
  XPathExpression xPExprAdditionalInfo = xPath.compile("./nodeName");
  String separator =  xPExprAdditionalInfo.evaluate(node);
  </code></pre>
  
  <p>Any help would be appreciated.</p>