You can use the "display" attribute in CSS to control whether tags should display "inline" or in a separate "block".
If you want to start playing with the layout more, it is best to separate the elements, for example:
code:
function nodeToObject(n:XMLNode):Object {
var o:Object = new Object();
for (var i in n.childNodes) {
o[n.childNodes[i].nodeName] = n.childNodes[i].firstChild.nodeValue;
}
return o;
}
newsContent.onLoad = function(success)
{
if (success) {
var ns:Array = this.firstChild.firstChild.childNodes;
var s:String = "";
for( var i=0;i<ns.length;i++ ) {
var newsItem:Object = nodeToObject(ns[i]);
s += "<entryDate>News item number "+(i+1)+" published on "+newsItem.entryDate+"</entryDate>";
s += "<entrytitle>"+newsItem.entryTitle+"</entrytitle>";
s += "<entrybody>"+newsItem.entryBody+"</entrybody>";
if((i+1) < ns.length) s += "<BR />______ ----- @@@@</BR>";
}
}
newsText.htmlText = s;
}




Reply With Quote