title: parse responseText or change responseText in responseXML
body: <p>ok so my responseText contains an '&amp;' character which seems to cause problems when parsing. so I want to grab my responseText and change the '<code>&amp;</code>' for '<code>&amp;amp;</code>'</p>
  
  <p>I'm aware responseText is a String and ideally I want to feed this back into the responseXML to parse with the new xml with &amp;</p>
  
  <p>any help much appreciated</p>
  
  <pre><code>            responseXML  = xmlhttp.responseXML;
          var myResponseText = "&lt;document-metadata&gt;&lt;item&gt;&lt;name&gt;ccms_customer_key&lt;/name&gt;&lt;value&gt;0100000931012004110&lt;/value&gt;&lt;/item&gt;&lt;item&gt;&lt;name&gt;ccms_customer_name&lt;/name&gt;&lt;value&gt;Mr Joe Bloggs&lt;/value&gt;&lt;/item&gt;&lt;item&gt;&lt;name&gt;ccms_customer_salutation_name&lt;/name&gt;&lt;value&gt;Mr&lt;/value&gt;&lt;/item&gt;&lt;item&gt;&lt;name&gt;ccms_rm_name&lt;/name&gt;&lt;value&gt;&lt;/value&gt;&lt;/item&gt;&lt;item&gt;&lt;name&gt;ccms_dms_key&lt;/name&gt;&lt;value&gt;2432559OEKM&lt;/value&gt;&lt;/item&gt;&lt;item&gt;&lt;name&gt;ccms_customer_address&lt;/name&gt;&lt;value&gt;Main &amp; Street Dublin &lt;/value&gt;&lt;/item&gt;&lt;/document-metadata&gt;";
          /*
          if(myResponseText.indexOf('&amp;') &gt;= 0)    
          {
              var str = myResponseText.replace(/&amp;/g,"&amp;amp;");
              return str;
          }
          */
          //old line getSession().setAttribute('LH_METADATA_XML',xmlhttp.responseText);
          getSession().setAttribute('LH_METADATA_XML',myResponseText);
  
          // extract COMP_DMS_KEY from metadata
          var root = responseXML.getElementsByTagName('document-metadata').item(0);
  </code></pre>