Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




XML Help?



Hello all... this should be pretty simple. I'm fairly new to XML, and having trouble getting the following XML structure into an array. I basically want one array structured something like:

array[group1][item1, item2, etc...]

...where the various attributes of item1, item2, etc are accessible, something like:

array[0][1].name
array[0][1].start
etc...

Anyway, this is my XML file - I've tried parsing it a million different ways, but I can't seem to get the data into an array the way I want:


ActionScript Code:
<?xml version="1.0"?> <sample> <group1>    <item name="name 1" start="1778" end="1824"/>    <item name="name 2" start="1926" end="1990"/>    <item name="name 3" start="1990" end="2010"/>    <item name="name 4" start="2010" end="2010"/>   </group1> <group2>    <item name="name 1" start="1920" end="1962"/>   </group2> <group3>    <item name="name 1" start="1926" end="1990"/>    <item name="name 2" start="1776" end="1780"/>    <item name="name 3" start="1828" end="1860"/>   </group3> <group4>    <item name="name 1" start="1926" end="1990"/>    <item name="name 2" start="1856" end="1922"/>    <item name="name 3" start="2010" end="2010"/></group4> </sample>
Any help would be awesome... if I see another "undefined" in my output window I'm gonna kill myself!

Thanks in advance.



Ultrashock Forums > Flash > ActionScript
Posted on: 2006-09-03


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

    Copyright © 2005-08 www.BigResource.com, All rights reserved