I am trying to change some code…

My main problem is I want to put the url of the image xml tag in a nod, instead of it being an attribute. Now I can do this easily in XML , but reading this in .as is another issue. I have attached the code below in pastie so you can see what I am doing.



-----------------XML Code - below is how the image node is working now... I want to get rid of the imageurl attribute and just read the url through the node

<?xml version="1.0" encoding="utf-8" ?>
<news date="" thumburl="images/hamptons/img3.jpg">
		<title>Monroe Place</title>
		<image imageurl="images/hamptons/big2b.jpg"></image>
		<image imageurl="images/hamptons/big2.jpg"></image>
		<image imageurl="images/hamptons/big3.jpg"></image>

-----------------XML Code - What I need

<?xml version="1.0" encoding="utf-8" ?>
	<news date="" thumburl="images/hamptons/img1.jpg">

-----------------actionscript code:

class NewsXMLLoader extends XMLLoader
	public var data:Object
	 * Cons.
	 * @param	tl
	public function NewsXMLLoader(tl:MovieClip) 
		super(tl );
	private function parseXML():Void {
		data = new Object();
		data.data = new Array();
		var newsItems:Array = asObj.data.news;
		if (newsItems.length==undefined) {
			newsItems = [asObj.data.news];
		var t:Number = newsItems.length;
		//UI value..
		data.datecolor = (String(asObj.data.datecolor.data));
		data.thumbsize = StringUtil.toVector(String(asObj.data.thumbsize.data));
		data.frameWH = StringUtil.toVector(String(asObj.data.frameWH.data));
		data.overcolor = Number(String(asObj.data.overcolor.data));
		data.normalcolor = Number(String(asObj.data.normalcolor.data));
		data.framealpha = Number(String(asObj.data.framealpha.data));
		data.thumbbordercolor = Number(String(asObj.data.thumbbordercolor.data));
		data.thumboverbordercolor = Number(String(asObj.data.thumboverbordercolor.data));
		//push in a array.
		for (var i:Number = 0; i < t;i++ ) {
			var news = newsItems[i];
			var newsVO:Object = new Object();
			var $date:String = news.attributes.date;
			var $thumburl:String = news.attributes.thumburl;
			//var $thumburl:String = String(news.image.data);
			var $des:String = String(news.description.data);
			var $title:String = String(news.title.data);
			var images:Array = news.image;
			if (images.length==undefined) {
				images = [news.image];
			var it:Number = images.length;
			newsVO.images = new Array();
			for (var k:Number = 0; k < it; k++ ) {
				var img:Object = images[k];
				var image:Image = new Image();
				image.imageurl = img.attributes.imageurl;
			//init the vo
			newsVO.title = $title;
			newsVO.date = $date;
			newsVO.description = $des;
			var thumb:Image = new Image();
			thumb.imageurl = $thumburl;
			newsVO.thumbnail = thumb;
			//add to data