Hi, I searched around and seen the xml guide here…
I need just to load in flash some text and some links…
So this is what i have done:
function loadXML(loaded) {
if (loaded) {
_root.dataNews = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.testoNews = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
_root.testoNews2 = this.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;
data_txt.text = _root.dataNews;
testo_txt.text = _root.testoNews;
testo2_txt.text = _root.testoNews2;
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("news.xml");
And it works.
Ok, great but I can’t see the link…
Here is the xml file:
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<news>
<contenuto>
<data>09/06/2006</data>
<testo>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo.</testo>
<testo2><![CDATA[<a href="<A href="http://www.domain.com">domain.com</a>]]></testo2">http://www.domain.com">domain.com</a>]]></testo2>
<!--<image>img/img1.jpg</image>-->
</contenuto>
</news>
I used the cdata like i have red around but it don’t works.
Anyone can help?