I’m trying to use the simple editor tutorial because I need to edit a XML from flash but I would love to use a combobox and the XML to choose different nodes.
Someone can explain me how I can achieve this?
at the moment I cant edit only one node: <edit></edit>
**files: **HERE
var input_xml = new XML();
input_xml.ignoreWhite = true;
input_xml.contentType = "text/xml";
input_xml.onLoad = function(success){
if (success) input_txt.text = this.firstChild.firstChild.nodeValue;
else input_txt.text = "Error loading input XML";
}
var output_xml = new XML();
output_xml.ignoreWhite = true;
output_xml.onLoad = function(success){
if (success) output_txt.text = this.firstChild.firstChild.nodeValue;
else output_txt.text = "Error loading output XML";
}
var xml_file = "readwrite/simple_edit.xml";
var server_file = "simple_save.php";
load_btn.onRelease = function(){
input_txt.text = "Loading...";
input_xml.load(xml_file + "?uniq=" + new Date().getTime());
}
send_btn.onRelease = function(){
input_xml.parseXML("<edit> new text </edit>");
input_xml.firstChild.firstChild.nodeValue = input_txt.text;
input_xml.xmlDecl = ""; // declaration duplication bug
input_xml.sendAndLoad(server_file, output_xml);
output_txt.text = "Loading...";
}
clearin_btn.onRelease = function(){
input_txt.text = "";
}
clearout_btn.onRelease = function(){
output_txt.text = "";
}