Click to See Complete Forum and Search --> : Saving HTML Form Data to XML....... Need Help......


zhixiong
12-20-2002, 04:00 AM
Pls look at the link below so as to understand my problem.....the page is very short so pls have a look at it.

http://www.xmlfiles.com/articles/michael/htmlxml/default.asp

For the above link, the datas are being saved to xml using 'processForm.asp', if i cant use 'ASP' and my only choices are 'JSP' or 'Java' , 'XSL' to display. Can it be done???

Any websites that have similar examples or links will be greatly thankful.....

cssrules
12-22-2002, 09:00 PM
You can do the exact same job with Javascript, as long as you make use of xmldom again....

Here is a snippet that can probably pinpoint the similarity of the two approaches. Hope that it helps:

var xmlDOM = new ActiveXObject("msxml.DOMDocument");

// Load XML data from a URL into the XML DOM (Document
// Object Model).
xmlDOM.async = false;
xmlDOM.load("some URL that returns an XML stream");

// Iterate over the XML DOM tree to get the list of items,
// loading them into an HTML SELECT control via DHTML.
document.all.selItems.length = 0;
var xmlNodes = xmlDOM.childNodes[1].childNodes;
for (var xmlNode = xmlNodes.nextNode();
xmlNode;
xmlNode = xmlNodes.nextNode())
{
var optNew = document.createElement("OPTION");
optNew.text = xmlNode.childNodes[0].text;
optNew.value = optNew.text;
document.all.selItems.options.add(optNew);
}

cssrules
12-22-2002, 09:05 PM
Then again this tutorial may help:

http://wdvl.internet.com/Authoring/Languages/XML/PracticalXML/practicalXML3_1.html