title: org.w3c.dom.Node.setNodeValue() not encoding certain special characters
body: <p>Using Java, I set the value of a <code>&lt;value&gt;</code> attribute in an xml file to be </p>
  
  <p><code>String val = "~!@#$%^&amp;*()_+-={}|[]\\:\";'&lt;&gt;?,./;"</code></p>
  
  <p>When I tried to use the api with input </p>
  
  <p><code>org.w3c.dom.Node.setNodeValue(val)</code></p>
  
  <p>and take a look at the xml, I see that the value attribute in the resulting xml looks this way-</p>
  
  <p><code>&lt;Value&gt;~!@#$%^&amp;amp;*()_+-={}|[]\:";'&amp;lt;&gt;?,./&lt;/Value&gt;</code></p>
  
  <p>I'm trying to figure out why this third party API is encoding only <code>&lt;</code> and <code>&amp;</code>, but not <code>&gt;</code>, <code>'</code> or <code>"</code>.</p>