Generating XML from JavaScript
Generating XML from JavaScript: When to use these functions: In some Javascript-based environments there are no XML libraries available, sometimes external libraries are not allowed or you just want fine control over your xml generation process. They are easy to implement and easy to use too. About the image: well, I just liked it. // Create an XML element. function createXMLElement(parent, name, data) { var node = new Object(); node["parent"] = parent; node["name"] = name; node["data"] = data; node["children"] = new Array(); node["attributes"] = new Array(); return node; } //Add child function addXMLChild(parent, child) { child["parent"] = parent; parent["children"].push(child); } // XML library: add a child function addXMLChildAtPos(parent, child,pos) { child["parent"] = parent; par...