convert a string to xml doc with jquery or the other way round
<p>i am trying to convert a string  to an xml document to read the verious nodes  or to append a new node with jquery and there after convert it back to a string again. can anyone help me on the please.
this is a snippet of my code </p>

<pre><code>xmldoc.find('ROOT').append(
    '&lt;USER&gt;&lt;ENAME&gt;'+ $(this).find('ENAME').text() +
     '&lt;/ENAME&gt;&lt;OPERATOR&gt;'+$(this).find('OPERATOR').text() +
     '&lt;/OPERATOR&gt;&lt;PNR&gt;'+$(this).find('PNR').text() +
     '&lt;PNR&gt;&lt;/USER&gt;'
);

if (window.ActiveXObject) {
    xmldocStr = xmldoc.xml;
}
// code for Mozilla, Firefox, Opera, etc.
else {
    xmldocStr = (new XMLSerializer()).serializeToString(xmldoc);
</code></pre>
