woah
11-25-2006, 06:00 PM
This is my first experience with this code so I'm sorry if its a really dumb mistake but i can't figure it out.
I have a script which checks for IE/firefox etc, and then loads an xml file using: xmlDoc.load("pics.xml");
It then goes on to perform this very simple alteration:
var x = xmlDoc.getElementsByTagName("photos");
var newPic = xmlDoc.createElement("pic");
x[0].appendChild(newPic);
Neither IE or Firefox give me an error when this script runs, but when I check the XML file no changes have been made at all. It simply does not append the child and gives me no reason. Any help is much appreciated, thanks in advance.
I have a script which checks for IE/firefox etc, and then loads an xml file using: xmlDoc.load("pics.xml");
It then goes on to perform this very simple alteration:
var x = xmlDoc.getElementsByTagName("photos");
var newPic = xmlDoc.createElement("pic");
x[0].appendChild(newPic);
Neither IE or Firefox give me an error when this script runs, but when I check the XML file no changes have been made at all. It simply does not append the child and gives me no reason. Any help is much appreciated, thanks in advance.