Skip to main content
Participant
June 8, 2010
Question

XML Question

  • June 8, 2010
  • 1 reply
  • 1326 views

Hello All. I am currently working on an educational project. After submitting for review, the clients have requested I make an array which was hard coded in the as file to read from xml. The problem I am having is that I do not know how to populate the array with the information contained in the as file. Any help would be appreciated.

wordList = ("Paper,Plastic,Reduce,Retrieve,Litter,Trash,Glass,Recycle").split(",");

I am wantying to replace the word lists that are included with the information in the xml file so as to allow different users to create different words for the list without having to edit anything othere than the xml file.

    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    Participant
    June 19, 2010

    var xml:XML =
    <wordlist>
        <word>Paper</word>
        <word>Plastic</word>
        <word>Reduce</word>
        <word>Retrieve</word>
        <word>Litter</word>
        <word>Trash</word>
        <word>Glass</word>
        <word>Recycle</word>
    </wordlist>;
    var list:XMLList = xml.word;
    list[0] Paper
    list[3] Retrieve
    list[6] Glass