ok so. i have to actually read the xml file now.
the code has to read this array. “processimports”.
how do i do that. the answer is. use a FOR loop.
loops are basically... repeating actions. i guess. while conditions are met or are not met, the actions keep looping.
a FOR loop looks like this.
basically theres a line at the top. the FOR loop. containing three “arguments” within the brackets, seperated by semi colons. ;’s.
breaking it down, there is “var i: uint=1;”. i think this has a name. initializer? i don’t remember. basically it sets up the loop by creating it’s own dummy variable. the “uint” is what kind of variable it is. it could be a string if you want i guess. the number that follows is “1″ because that’s it’s starting value. because it can’t just have “no” value. that’s dumb.
it can be any name you want. usually it’s “i” and letters after like “j” and “k”.
then there is “i <= 10;”. this is the condition on how it keeps looping. once this condition is met, then the loop ends. as in, when the variable “i” is less than or equal to “10″, then the loop ends. i think.
finally there is “i++”. or for readability’s sake, “i = i + 1″. it is an action that is performed every time it loops. in this case, it adds “1″ to the variable “i”. so now i is “2″ or “3″ or so on blah blah.
all together, the loop starts with “i = 1″. the loop ends when “i <= 10″. when the actions within the curly backets {} are done it adds “1″ to “i”, making “i = 2″. this is additive! next time it will be “i = 3″ then “i = 4″ until it reaches “i = 10″!
so this is the method of which i will be able to scan through an array, thereby reading the entire list of tags of “processimport”.
instead of a fixed number as the condition like “i == 10″, it grabs the “length of the array” number that i explained earlier: how many things are in the array. in this case, the array “processimport” has 5 tags. so it is “i >= 5″.
so it scans through the list of tags, from 1 to 5.
i made a mistake. it should be 0 to 4. dang.
it scans the element one at a time. every time it does it copys it to an array variable. so i can call it back later without having to type as much. yes. it also lets out a nice message about what is the number of i right now and the text it copies.
and with that, the entire array is read and scanned for later usage.
this may be completely nonsensical. i am rambling to myself here.