Erm, trying to grab the attributes of a node, and can’t target it.
<?xml version="1.0"?>
<header>
<scoreboard url="simpleScoreboard.jsp"/>
<background>
<folder url="media/headers/" count="10" prefix="header_bg_" suffix=".jpg" override="false" startTime="10" />
<abc foreground="media/headers/abcForeground.swf" foreground2="media/headers/abcForeground2.swf" background="media/headers/abcBackground.swf" on="true" />
</background>
<ad>
<geoTarget countryCode="US" swf="media/hdr_trades.swf" link="entry.point?target=z&source=foo" />
<geoTarget countrycode="other" swf="" link="" />
</ad>
</header>
The only data I need to parse is
<ad>
<geoTarget countryCode="US" swf="media/hdr_trades.swf" link="entry.point?target=z&source=foo" />
<geoTarget countrycode="other" swf="" link="" />
</ad>
The rest isn’t being used.
What’s annoying is
for (attr in adXMLNode.firstChild.attributes) {
trace(attr+" = "+adXMLNode.firstChild.attributes[attr]);
}
Will trace the url attribute of the first node but I can’t find the correct targetting for the node I need.
I’ve been using AS 3 to do all my XML stuff but I can’t use AS 3 for this project unfortunately and I don’t really get it with AS 2.
Anyway any help would be huge right now.
Thanks guys!