RSS compilation using flash

I am trying to make a compiler for an rss feed in flash but am finding it difficult.

my actionscript looks like this:

myRSS.firstChild.firstChild.appendChild(myRSS.createElement("item"));
myRSS.firstChild.firstChild.lastChild.appendChild(myRSS.createElement("description"));
myRSS.firstChild.firstChild.lastChild.lastChild.appendChild(myRSS.createTextNode(des));
myRSS.firstChild.firstChild.lastChild.appendChild(myRSS.createElement("title"));
myRSS.firstChild.firstChild.lastChild.lastChild.appendChild(myRSS.createTextNode(tit));

and my rss xml file looks like this:

<?xml version="1.0"?> 
<rss version="2.0">
<channel>

</channel>
</rss>

…the data from flash will be placed in between. At the moment it clears the xml file. I just can’t understand what is wrong! Please Help!