Problem with Updating Xml in Mozilla

webmasterbeta

New Member
Hai

I am facing this error while trying to update the xml nodes in mozilla,

Error: uncaught exception: [Exception... "Modifications are not allowed for this document" code: "7" nsresult: "0x80530007 (NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR)" location: "http://localhost/Panorama/Default.aspx Line: 330"]

I am trying update with this code

var objNewNode = xmlDoc.createElement("control");

var nodeAttr=xmlDoc.createAttribute("name");//("name", controlnames[controlId]);
var nodeText = xmlDoc.createTextNode(name);
nodeAttr.appendChild(nodeText);
objNewNode.setAttributeNode(nodeAttr,name);

Line 330 is this var nodeText = xmlDoc.createTextNode(name);

have any idea anyone how to update xml nodes useing javascript in mozilla,
I am importing xmldoc in mozila like this (document.implementation && document.implementation.createDocument)

Please help to solve this problem

Plzzzzzzzzzzzzzzzz

thanks in advance
friendster
 
Back
Top