Helpful Information
 
 
Category: Apache Flex
XML file loaded but don't shows

Hi guys,

I'm on a game clan (GRAW2), I'm trying to make a kind of "Games Stats" with the xml generated by the game self but can't. I'm using AS2. I'm sure it loads the xml file but don't show the information.

But when I take away all the next line it shows



<match_statistics version="1.0" 01_05_2008 00:42>
<match map="tdm_arroyo" gametype="Recon Vs Assault" rounds="2" winner="Bravo" score_team_a="0" score_team_b="2">

Replaced by

<match_statistics>


The solution should be to ignore this line but I don't know the way to do this. :confused:

This is the code i'm using on Flash, AS2:



var xmlObj:XML = new XML();
xmlObj.ignoreWhite = true;
xmlObj.load("xml/match_info.xml");
xmlObj.onLoad = function(success) {
var rootNode:XMLNode = xmlObj.firstChild;
if (success) {
trace(this);
}
/* Crear variables Nodes +3*/
var extraNode0:XMLNode = rootNode.firstChild.firstChild;
var extraNode1:XMLNode = rootNode.firstChild.firstChild.nextSibling;
var extraNode2:XMLNode = rootNode.firstChild.firstChild.nextSibling.nextSibling;
var extraNode3:XMLNode = rootNode.firstChild.firstChild.nextSibling.nextSibling.nextSibling;
var extraNode4:XMLNode = rootNode.firstChild.firstChild.nextSibling.nextSibling.nextSibling.nextSibling;
/* --------------------- */
for (i=0; i<=4; i++) {
pName0 = extraNode0.attributes.name;
pKill0 = extraNode0.firstChild.attributes.total_kills;
pDeath0 = extraNode0.firstChild.attributes.deaths;
pSuicide0 = extraNode0.firstChild.attributes.suicides;
pFired0 = extraNode0.firstChild.nextSibling.attributes.bullets_fired;
pAccur0 = extraNode0.firstChild.nextSibling.attributes.accuracy;
///////////////////////////////////
pName1 = extraNode1.attributes.name;
pKill1 = extraNode1.firstChild.attributes.total_kills;
pDeath1 = extraNode1.firstChild.attributes.deaths;
pSuicide1 = extraNode1.firstChild.attributes.suicides;
pFired1 = extraNode1.firstChild.nextSibling.attributes.bullets_fired;
pAccur1 = extraNode1.firstChild.nextSibling.attributes.accuracy;
///////////////////////////////////
pName2 = extraNode2.attributes.name;
pKill2 = extraNode2.firstChild.attributes.total_kills;
pDeath2 = extraNode2.firstChild.attributes.deaths;
pSuicide2 = extraNode2.firstChild.attributes.suicides;
pFired2 = extraNode2.firstChild.nextSibling.attributes.bullets_fired;
pAccur2 = extraNode2.firstChild.nextSibling.attributes.accuracy;
///////////////////////////////////
pName3 = extraNode3.attributes.name;
pKill3 = extraNode3.firstChild.attributes.total_kills;
pDeath3 = extraNode3.firstChild.attributes.deaths;
pSuicide3 = extraNode3.firstChild.attributes.suicides;
pFired3 = extraNode3.firstChild.nextSibling.attributes.bullets_fired;
pAccur3 = extraNode3.firstChild.nextSibling.attributes.accuracy;
///////////////////////////////////
pName4 = extraNode4.attributes.name;
pKill4 = extraNode4.firstChild.attributes.total_kills;
pDeath4 = extraNode4.firstChild.attributes.deaths;
pSuicide4 = extraNode4.firstChild.attributes.suicides;
pFired4 = extraNode4.firstChild.nextSibling.attributes.bullets_fired;
pAccur4 = extraNode4.firstChild.nextSibling.attributes.accuracy;
}
///////////////////////////////////
};



This is the kind of XML generated by the game:



<match_statistics version="1.0" 01_05_2008 00:42>
<match map="tdm_arroyo" gametype="Recon Vs Assault" rounds="2" winner="Bravo" score_team_a="0" score_team_b="2">
<players>
<player name="Gamekos">
<summary rank="1" total_kills="14" assisted_kills="2" instant_kills="0" deaths="12" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="353" grenades_thrown="0" enemies_killed="14" teamates_hit="0" teammates_killed="0" accuracy="16" far_kill_range="66" short_kill_range="6" avg_kill_range="24"/>
<weapon name="m61" bullets_fired="0" grenades_thrown="2" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
</player>
<player name="[HI]ARCAN">
<summary rank="1" total_kills="32" assisted_kills="1" instant_kills="1" deaths="19" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="580" grenades_thrown="0" enemies_killed="31" teamates_hit="0" teammates_killed="0" accuracy="15" far_kill_range="76" short_kill_range="4" avg_kill_range="31"/>
<weapon name="m61" bullets_fired="0" grenades_thrown="16" enemies_killed="1" teamates_hit="0" teammates_killed="0" accuracy="6" far_kill_range="44" short_kill_range="44" avg_kill_range="44"/>
</player>
<player name="bohy010">
<summary rank="1" total_kills="6" assisted_kills="1" instant_kills="1" deaths="12" suicides="0" scores="0" tags="0"/>
<weapon name="rx4" bullets_fired="49" grenades_thrown="0" enemies_killed="6" teamates_hit="0" teammates_killed="0" accuracy="36" far_kill_range="96" short_kill_range="18" avg_kill_range="40"/>
</player>
<player name="AIKI70">
<summary rank="1" total_kills="10" assisted_kills="0" instant_kills="0" deaths="7" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="195" grenades_thrown="0" enemies_killed="9" teamates_hit="0" teammates_killed="0" accuracy="17" far_kill_range="53" short_kill_range="1" avg_kill_range="18"/>
<weapon name="m416" bullets_fired="10" grenades_thrown="0" enemies_killed="1" teamates_hit="0" teammates_killed="0" accuracy="10" far_kill_range="13" short_kill_range="13" avg_kill_range="13"/>
</player>
<player name="kipkorn">
<summary rank="1" total_kills="10" assisted_kills="0" instant_kills="0" deaths="7" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="88" grenades_thrown="0" enemies_killed="5" teamates_hit="1" teammates_killed="0" accuracy="15" far_kill_range="60" short_kill_range="8" avg_kill_range="32"/>
<weapon name="g36" bullets_fired="41" grenades_thrown="0" enemies_killed="3" teamates_hit="0" teammates_killed="0" accuracy="9" far_kill_range="43" short_kill_range="8" avg_kill_range="22"/>
<weapon name="g36_compact" bullets_fired="30" grenades_thrown="0" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="grenade_launcher" bullets_fired="2" grenades_thrown="0" enemies_killed="2" teamates_hit="0" teammates_killed="0" accuracy="100" far_kill_range="27" short_kill_range="25" avg_kill_range="26"/>
<weapon name="m61" bullets_fired="0" grenades_thrown="2" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="m8_compact" bullets_fired="2" grenades_thrown="0" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="rx4" bullets_fired="7" grenades_thrown="0" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="saw" bullets_fired="10" grenades_thrown="0" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
</player>
<player name="joliver">
<summary rank="1" total_kills="0" assisted_kills="1" instant_kills="0" deaths="7" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="38" grenades_thrown="0" enemies_killed="0" teamates_hit="1" teammates_killed="0" accuracy="5" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="m61" bullets_fired="0" grenades_thrown="2" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
</player>
</players>
</match_statistics>

anybody tell me details



York travel guide from Hotels in York Ltd (http://www.york-united-kingdom.co.uk/) Wire Dog Crates (http://www.puppys-place.com/dog-crates-and-kennels/petmate-wire-dog-crates.html)










privacy (GDPR)