Change xml news_editor to read attributes

Dear,

I would like to use the xml news_editor to read on attributes rather than on siblings… for editing a xml file looking like:

[color=#0000ff]<?xml version=“1.0” encoding=“utf-8” ?>[/color]
[[font=Courier New][color=#ff0000]-[/color][/font]](file:///C:/Documents%20and%20Settings/Frederik%20De%20Fruyt/My%20Documents/Events.xml#) [color=#0000ff]<[/color][color=#990000]Events[/color][color=#0000ff]>[/color]
[color=#0000ff]<[/color][color=#990000]Event[/color] [color=#990000]DateOf[/color][color=#0000ff]="[/color]01/04/2004[color=#0000ff]"[/color][color=#990000] Hour[/color][color=#0000ff]="[/color]10:20[color=#0000ff]"[/color][color=#990000] Header[/color][color=#0000ff]="[/color]FREDERIK[color=#0000ff]"[/color][color=#990000] Content[/color][color=#0000ff]=“Event 1[/color][color=#0000ff]”[/color][color=#990000] AddedOn[/color][color=#0000ff]="[/color][color=#000000]Sat Oct 9 14:33:58 GMT+0200 2004[/color][color=#0000ff]" />[/color]

[color=#0000ff]<[/color][color=#990000]Event[/color] [color=#990000]DateOf[/color][color=#0000ff]="[/color]01/05/2004[color=#0000ff]"[/color][color=#990000] Hour[/color][color=#0000ff]="[/color]11:30[color=#0000ff]"[/color][color=#990000] Header[/color][color=#0000ff]="[/color]ILSE[color=#0000ff]"[/color][color=#990000] Content[/color][color=#0000ff]=“Event 2[/color][color=#0000ff]”[/color][color=#990000] AddedOn[/color][color=#0000ff]="[/color]Sat Oct 9 14:33:58 GMT+0200 2004[color=#0000ff]" />[/color]

[color=#0000ff]</[/color][color=#990000]Events[/color][color=#0000ff]>[/color]

I managed to change already a lot, so I can add new items to the list. Only the EDITING OF EXISTING ITEMS DOES NOT SEEM TO WORK.

Can somebody help me on this (below the edit code):

EditNewsEntry = function(news_xml, node_index, title, body, dates, hour){
var entry = GetEntry(news_xml, node_index);
if (title == “” && body == “”){
entry.removeNode();
return (0);
}else{
if (title == “”) title = “(none)”;
if (body == “”) body = “(none)”;
}
entry.attributes.AddedOn = new Date().toString();
var titleTextNode = entry.attributes.Header;
var bodyTextNode = entry.attributes.Content;
trace (titleTextNode);
bodyTextNode.nodeValue = body;

//entry.attributes.DateOf = dates;
//entry.attributes.Hour = hour;
//entry.attributes.Header = title;
//entry.attributes.Content = body;
}

AND ALSO THE BODYTEXT CODE

GetBodyText = function(news_xml, entry_index){
var entries = news_xml.firstChild.childNodes;
var body_element = entries[entry_index].firstChild;
return body_element.firstChild.nodeValue;
}

I will use this to add events to a calendar, should also be password protected in the future.
Thanks for your help…
I am already struggling some day’s on this…
Frederik.
Visit: http://www.baby.shyper.com/Flash/Ot…ntsCalendar.swf to see the calendar. Or visit to see the work I have managed so far [url=“http://www.baby.shyper.com/Flash/Other/EventsCalendar.swf”]http://www.baby.shyper.com/Flash