title: How to write special character ( &, <,> etc ) in xml using dom parser
body: <p>I want to create an xml file which have '&amp;' in one of its text node. like </p>
  
  <pre><code>&lt;url&gt;www.sample.com/where/values?firstvalue=1&amp;secondvalue=2&lt;/url&gt;
  </code></pre>
  
  <p>Now what I am getting is </p>
  
  <pre><code>&lt;url&gt;www.sample.com/where/values?firstvalue=1&amp;amp;secondvalue=2&lt;/url&gt;
  </code></pre>
  
  <p>Could you please let me know how can I achieve that. I am attaching the url value to dom using <code>contenturl.appendChild(doc.createTextNode(model.getDocURL()));</code></p>
  
  <p>and I am parsing using following method</p>
  
  <pre><code>        DOMSource source = new DOMSource(doc);
          transformer = transformerFactory.newTransformer();
          transformer.setOutputProperty(OutputKeys.INDENT, "yes");    
          transformer.transform(source, result);
  </code></pre>