Reading Attributes in XML


Does anyone know how to read attributes in XML?

This is my frame ActionScript.

news = new XML();
news.ignoreWhite = true;
news.onLoad = function(success){
rootNode = news.firstChild;
nouvelle1 = rootNode.firstChild;
nouvelle2 = nouvelle1.nextSibling;
else {
trace (“Error while loading file”);

This is my nouvelles.xml external document:

<?xml version=“1.0” encoding=“iso-8859-1”?>
<nouvelle1>This is news 1</nouvelle1>
<nouvelle2>This is news 2</nouvelle2>

I have 2 text fields in my movie.
One that will read the attributes of <nouvelle 1></nouvelle1>
and the other the attributes of <nouvelle 2></nouvelle2>.

But what is showing in the textfields is :
textfield #1 = <nouvelle1>This is news 1</nouvelle1>
textfield #2 = <nouvelle2>This is news 2</nouvelle2>

I just want the “This is news 1” and “This is news 2” without the <nouvelle1></nouvelle1> and <nouvelle2></nouvelle2> tags.

Any ideas what’s missing in my frame actionScript?

Thanks! :beam: