# Record data on XML tutorial:simple editor

**URL:** https://forum.kirupa.com/t/record-data-on-xml-tutorial-simple-editor/155941
**Category:** flash
**Created:** [July 21, 2005, 12:41pm UTC](https://forum.kirupa.com/t/record-data-on-xml-tutorial-simple-editor/155941 "2005-07-21T12:41:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Lobo\_](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@Lobo\_](https://forum.kirupa.com/u/Lobo_)
#### Post date: [July 21, 2005, 12:41pm UTC](https://forum.kirupa.com/t/record-data-on-xml-tutorial-simple-editor/155941/1 "2005-07-21T12:41:10Z")

</div>

I’m trying to use the [simple editor tutorial](http://www.kirupa.com/web/xml/examples/simpleeditor.htm) 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](http://www.kirupa.com/web/xml/examples/simple_editor.zip)

```php
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 = "";
}

```
