Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

persistance for xml/html

Status
Not open for further replies.

shamdog22

Programmer
Feb 22, 2005
1
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top