quote:
Originally posted by rob_botch
To write to xml:
code:
var xml = new ActiveXObject("Microsoft.XMLDOM"); //Create xml object
xml.load(XMLPath); //XMLPath is the path of your XML file
var toAdd = xml.createElement("Element"); //Create an element called "Element"
toAdd.appendChild(xml.createTextNode("Text")); //Add the text "Text" to the element that you just created
xml.getElementsByTagName("Parent")[0].appendChild(toAddMessage); //Add the newly created element to the first instance of "Parent"
xml.save(XMLPath); //Save the XML file to the path specified
I hope that this helps,
Robert
I wanna say thankyou to you first. I have to find out more about this before I can tell whether it works or not.