How might I store somthign like this in an array?
<event date="4" name="On Campus" text="Look for Zeta Psi Brothers on campus with their blue shirts. 11-3pm">
If the XML is filled with these, on for whatever day of that month.
Printable View
How might I store somthign like this in an array?
<event date="4" name="On Campus" text="Look for Zeta Psi Brothers on campus with their blue shirts. 11-3pm">
If the XML is filled with these, on for whatever day of that month.
depends on what you want, be more specific
Ill have an 2d array Called Event List so:
eventList = new Array([date,name,text],[date,name,text],[date,name,text]...) for all the event listed in the XML File.
like this:
PHP Code:var eventList = new Array();
var node = xmlLoaded.firstChild.childNodes;
for (i=0;i<node.length;i++){
var obj = new Object();//create temporary object to store data
obj.date = node[i].attributes.date;//read xml childNode i with attributes...
obj.name = node[i].attributes.name;
obj.text = node[i].attributes.text;
eventList.push(obj);//add temporary object to array
}