Need help adjusting tutorial script

A brief description of what i want to accomplish:

Ive got a swf file which contains 2 input text fields and an image selector, both the input text fields and the image selector return a value to a variable after inputting the information.

Now i want to write the information from those variables in a XML document (so i can later on read that xml data in another swf).

Since my knowledge from xml is near nothing, I’d hoped someone could quickly adapt this tutorial script for me.

======================================
My XML file would be this:

<slide>
<title>Title goes here</title>
<contents>Main contents text goes here</contents>
<background>url to selected image goes here</background>
</slide>

Script for writing to XML from tutorial which needs to be adapted: (I will use the simple_save.php file from the tutorial)

var xml_file = “readwrite/simple_edit.xml”;
var server_file = “simple_save.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”;
}

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…”;
}

Has to be adapted so that it writes the info from:
-input_title
-input_contents
-input_backgroundurl
In the XML document as I specified it above.

Thanks a lot, I should be able to figure out how it works once I see the changes which have been made.

Regards