i need help reading data from an xml file to a javascript array. from searching online, all i could find was how to store everything into one array, but i want to do something a little different.
below is an example xml file with 1 item consisting of 4 element:
and here are the arrays i'd like the info stored in:Code:<games> <game> <answer>"1","4","2","3","4","3","1","2","3","2","4","1","2","1","3","4"</answer> <clue>"3-","0","4*","3 ","7+","3 ","0","0","0","2/","0","3-","2/","0","3 ","0"</clue> <vertical>"0","0","1","1","0","1","1","0","0","1","0","1","0","0","1","1"</vertical> <horizontal>"1","1","0","1","0","1","1","1","1","1","1","0","0","0","0","0"</horizontal> </game> </games>
please let me know if you can help. thanks in advance.Code:var arrayClues = new Array(); var arrayVertical = new Array(); var arrayHorizontal = new Array(); var arrayAnswers = new Array();



Reply With Quote


Bookmarks