XML Help Reading Information!

Hello Everybody,

I´ve found a web page which displays an XML pge with the live scores of the NFL, I want to add this info to my flash site…

The XML:
[XML]
<nflSchedule week=“3”>

<matchup kickoff=“1222016400” gameSecondsRemaining=“0”>
<team id=“OAK” isHome=“0” score=“23” rushDefenseRank=“13” passDefenseRank=“26” rushOffenseRank=“3” passOffenseRank=“30”/>
<team id=“BUF” isHome=“1” score=“24” rushDefenseRank=“12” passDefenseRank=“5” rushOffenseRank=“23” passOffenseRank=“10”/>
</matchup>

<matchup kickoff=“1222016400” gameSecondsRemaining=“0”>
<team id=“MIA” isHome=“0” score=“38” rushDefenseRank=“11” passDefenseRank=“25” rushOffenseRank=“17” passOffenseRank=“12”/>
<team id=“NEP” isHome=“1” score=“13” rushDefenseRank=“24” passDefenseRank=“14” rushOffenseRank=“20” passOffenseRank=“18”/>
</matchup>

<matchup kickoff=“1222016400” gameSecondsRemaining=“0”>
<team id=“HOU” isHome=“0” score=“12” rushDefenseRank=“27” passDefenseRank=“6” rushOffenseRank=“19” passOffenseRank=“19”/>
<team id=“TEN” isHome=“1” score=“31” rushDefenseRank=“10” passDefenseRank=“3” rushOffenseRank=“7” passOffenseRank=“20”/>
</matchup>

<matchup kickoff=“1222016400” gameSecondsRemaining=“0”>
<team id=“CIN” isHome=“0” score=“23” rushDefenseRank=“28” passDefenseRank=“12” rushOffenseRank=“25” passOffenseRank=“24”/>
<team id=“NYG” isHome=“1” score=“26” rushDefenseRank=“7” passDefenseRank=“8” rushOffenseRank=“6” passOffenseRank=“9”/>
</matchup>

<matchup kickoff=“1222016400” gameSecondsRemaining=“0”>
<team id=“ARI” isHome=“0” score=“17” rushDefenseRank=“14” passDefenseRank=“11” rushOffenseRank=“21” passOffenseRank=“8”/>
<team id=“WAS” isHome=“1” score=“24” rushDefenseRank=“16” passDefenseRank=“16” rushOffenseRank=“12” passOffenseRank=“14”/>
</matchup>

<matchup kickoff=“1222016400” gameSecondsRemaining=“0”>
<team id=“TBB” isHome=“0” score=“27” rushDefenseRank=“20” passDefenseRank=“27” rushOffenseRank=“14” passOffenseRank=“5”/>
<team id=“CHI” isHome=“1” score=“24” rushDefenseRank=“4” passDefenseRank=“28” rushOffenseRank=“8” passOffenseRank=“16”/>
</matchup>

<matchup kickoff=“1222016400” gameSecondsRemaining=“0”>
<team id=“CAR” isHome=“0” score=“10” rushDefenseRank=“19” passDefenseRank=“13” rushOffenseRank=“22” passOffenseRank=“18”/>
<team id=“MIN” isHome=“1” score=“20” rushDefenseRank=“3” passDefenseRank=“20” rushOffenseRank=“5” passOffenseRank=“22”/>
</matchup>

<matchup kickoff=“1222016400” gameSecondsRemaining=“0”>
<team id=“KCC” isHome=“0” score=“14” rushDefenseRank=“31” passDefenseRank=“4” rushOffenseRank=“16” passOffenseRank=“26”/>
<team id=“ATL” isHome=“1” score=“38” rushDefenseRank=“23” passDefenseRank=“10” rushOffenseRank=“1” passOffenseRank=“21”/>
</matchup>

<matchup kickoff=“1222027500” gameSecondsRemaining=“0”>
<team id=“NOS” isHome=“0” score=“32” rushDefenseRank=“22” passDefenseRank=“29” rushOffenseRank=“28” passOffenseRank=“1”/>
<team id=“DEN” isHome=“1” score=“34” rushDefenseRank=“15” passDefenseRank=“32” rushOffenseRank=“10” passOffenseRank=“2”/>
</matchup>

<matchup kickoff=“1222027500” gameSecondsRemaining=“0”>
<team id=“STL” isHome=“0” score=“13” rushDefenseRank=“29” passDefenseRank=“30” rushOffenseRank=“32” passOffenseRank=“25”/>
<team id=“SEA” isHome=“1” score=“37” rushDefenseRank=“9” passDefenseRank=“24” rushOffenseRank=“4” passOffenseRank=“17”/>
</matchup>

<matchup kickoff=“1222027500” gameSecondsRemaining=“0”>
<team id=“DET” isHome=“0” score=“13” rushDefenseRank=“32” passDefenseRank=“23” rushOffenseRank=“29” passOffenseRank=“13”/>
<team id=“SFO” isHome=“1” score=“31” rushDefenseRank=“21” passDefenseRank=“7” rushOffenseRank=“11” passOffenseRank=“11”/>
</matchup>

<matchup kickoff=“1222028100” gameSecondsRemaining=“0”>
<team id=“JAC” isHome=“0” score=“23” rushDefenseRank=“17” passDefenseRank=“17” rushOffenseRank=“13” passOffenseRank=“23”/>
<team id=“IND” isHome=“1” score=“21” rushDefenseRank=“30” passDefenseRank=“2” rushOffenseRank=“31” passOffenseRank=“7”/>
</matchup>

<matchup kickoff=“1222028100” gameSecondsRemaining=“0”>
<team id=“PIT” isHome=“0” score=“6” rushDefenseRank=“2” passDefenseRank=“9” rushOffenseRank=“18” passOffenseRank=“27”/>
<team id=“PHI” isHome=“1” score=“15” rushDefenseRank=“1” passDefenseRank=“15” rushOffenseRank=“27” passOffenseRank=“3”/>
</matchup>

<matchup kickoff=“1222028100” gameSecondsRemaining=“0”>
<team id=“CLE” isHome=“0” score=“10” rushDefenseRank=“25” passDefenseRank=“18” rushOffenseRank=“30” passOffenseRank=“29”/>
<team id=“BAL” isHome=“1” score=“28” rushDefenseRank=“5” passDefenseRank=“1” rushOffenseRank=“2” passOffenseRank=“28”/>
</matchup>

<matchup kickoff=“1222042500” gameSecondsRemaining=“0”>
<team id=“DAL” isHome=“0” score=“27” rushDefenseRank=“6” passDefenseRank=“19” rushOffenseRank=“9” passOffenseRank=“3”/>
<team id=“GBP” isHome=“1” score=“16” rushDefenseRank=“26” passDefenseRank=“22” rushOffenseRank=“15” passOffenseRank=“6”/>
</matchup>

<matchup kickoff=“1222129800” gameSecondsRemaining=“0”>
<team id=“NYJ” isHome=“0” score=“29” rushDefenseRank=“8” passDefenseRank=“21” rushOffenseRank=“26” passOffenseRank=“15”/>
<team id=“SDC” isHome=“1” score=“48” rushDefenseRank=“18” passDefenseRank=“31” rushOffenseRank=“24” passOffenseRank=“4”/>
</matchup>
</nflSchedule>
[/XML]

So I load the XML succesfully, but I don’t really get to understand the nodes and the child nodes of this document, so I was wondering if someone with a little bit more of experience with me helps me with the code.

I have done the XML SlideShow tutorial, which I did correctly, but I used this code to extract the info:

 ActionScript Code:
 [LEFT][COLOR=#0000ff]xmlNode[/COLOR] = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]firstChild[/COLOR];
    image = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    titulo = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    descripcion = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    fecha = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    autor = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    total = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR].[COLOR=#0000ff]length[/COLOR];

    [COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR]i=[COLOR=#000080]0[/COLOR]; i&lt;total; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]


        image[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]nodeValue[/COLOR];
        titulo[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]nodeValue[/COLOR];
        descripcion[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]2[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]nodeValue[/COLOR];
        fecha[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]3[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]nodeValue[/COLOR];
        autor[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]4[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]nodeValue[/COLOR];
    [COLOR=#000000]}[/COLOR]

[/LEFT]

Using this XML:

[XML]
<?xml version=“1.0” encoding=“utf-8” standalone=“yes”?>
<images>
<pic>
<imagen>img/01.jpg</imagen>
<titulo>Ronnie Brown</titulo>
<descripcion>Ronnie Brown corriendo como todo un PRO</descripcion>
<fecha>Dic. 27, 2008</fecha>
<autor>Getty Images</autor>
</pic>
<pic>
<imagen>img/02.jpg</imagen>
<titulo>Jake Long</titulo>
<descripcion>Jake Long practicando como todo un campeon</descripcion>
<fecha>Dic. 20, 2008</fecha>
<autor>Getty Images</autor>
</pic>
<pic>
<imagen>img/03.jpg</imagen>
<titulo>Miami Chick</titulo>
<descripcion>Una Hermosura!!!</descripcion>
<fecha>Dic. 13, 2008</fecha>
<autor>www.welivetogether.com</autor>
</pic>
</images>
[/XML]

BUT NOW, I WANT TO USE A CODE MORE LIKELY TO THIS ONE INSTEAD OF THE PREVIOUS ONE:

 ActionScript Code:
 [LEFT][COLOR=#0000ff]xmlNode[/COLOR] = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]firstChild[/COLOR];
    image = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    titulo = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    descripcion = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    fecha = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    autor = [COLOR=#000000][[/COLOR][COLOR=#000000]][/COLOR];
    total = [COLOR=#0000ff]xmlNode[/COLOR].[COLOR=#0000ff]childNodes[/COLOR].[COLOR=#0000ff]length[/COLOR];

    [COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR]i=[COLOR=#000080]0[/COLOR]; i&lt;total; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]

        titulo[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]attributes[/COLOR].[COLOR=#000080]titulo[/COLOR];
        autor[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]attributes[/COLOR].[COLOR=#000080]autor[/COLOR];
        fecha[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]attributes[/COLOR].[COLOR=#000080]fecha[/COLOR];
        descripcion[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR] = [COLOR=#0000ff]xmlNode[/COLOR][COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]attributes[/COLOR].[COLOR=#000080]descripcion[/COLOR];
        

    [COLOR=#000000]}[/COLOR]

[/LEFT]

Yes, using the “attributes” propperty, but I couldn’t get it to work, its maybe because I don’t understand well the construction of the XML or maybe because I’m loading the XML from an external web page which has an XML tag at the top of the page (eventhough, the XML is loading succesful…).

So, basically if you help me to extract the info with the “attributes” propperties and you link a dynamic text box to MIAMI’s (or any other team) score (or any other attribue), even when you change of week or year, you will put me in the pinnacle to figure out everything else by myself…

I’ll upload my .SWF (because it wont let me upload the .FLA due to memmory matters), so you’ll se that it is loading the XML correctly and if you change the week or the year it will load another the respective XML correctly, but i just cant to do the rest…