OK, so far i know that the following code works with almost any xml file. What i need to know is how do i actually save the xml file back to disk once i make changes to the xml file in memory.
this is an html file
<HTML>
<HEAD>
<SCRIPT>
function loadXML() {
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.load(URL.value);
if (xmlDoc.parseError != 0) {
RESULTS.innerHTML = xmlDoc.parseError.reason + "<BR>"
}
else {
RESULTS.innerHTML = "XML document loaded successfully" + "<BR>"
// Obtain the first product element
var firstElement = xmlDoc.documentElement.childNodes.item(0);
// Delete the first element contained in the product element
firstElement.removeChild(firstElement.childNodes.item(0));
}
}
</SCRIPT>
</HEAD>
<BODY>
<H2>Enter the name of an XML document:</H2>
<INPUT TYPE="TEXT" SIZE="50" ID="URL">
<P>
<INPUT TYPE="BUTTON" VALUE="Load XML document"
onclick="javascript:loadXML()">
</P>
<DIV ID=RESULTS STYLE="color:red; font-weight:bold;">
</DIV>
</BODY>
</HTML>
/////////////////////////////////
If anyone has any idea's, i would appreciate the help. Thank you in advance.
Shamdog22
this is an html file
<HTML>
<HEAD>
<SCRIPT>
function loadXML() {
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.load(URL.value);
if (xmlDoc.parseError != 0) {
RESULTS.innerHTML = xmlDoc.parseError.reason + "<BR>"
}
else {
RESULTS.innerHTML = "XML document loaded successfully" + "<BR>"
// Obtain the first product element
var firstElement = xmlDoc.documentElement.childNodes.item(0);
// Delete the first element contained in the product element
firstElement.removeChild(firstElement.childNodes.item(0));
}
}
</SCRIPT>
</HEAD>
<BODY>
<H2>Enter the name of an XML document:</H2>
<INPUT TYPE="TEXT" SIZE="50" ID="URL">
<P>
<INPUT TYPE="BUTTON" VALUE="Load XML document"
onclick="javascript:loadXML()">
</P>
<DIV ID=RESULTS STYLE="color:red; font-weight:bold;">
</DIV>
</BODY>
</HTML>
/////////////////////////////////
If anyone has any idea's, i would appreciate the help. Thank you in advance.
Shamdog22