flash actionscript:
I am in the proccess of building a flash app for my youth group that will
display our current Bible reading plan.
What I want to do is read the information from an xml document and populate
the apporpriate text fields. This is the structure tat I'm using in my xml file:
<ReadingPlan>
<Entry uid="#">
<Date>
<DayOfWeek></DayOfWeek>
<Month></Month>
<Day></Day>
<Year></Year>
</Date>
<Scripture>
<Book></Book>
<Chapters></Chapters>
</Scripture>
</Entry>
</ReadingPlan>
I have loaded the xml file successfully, but I'm not sure how to search
through the entries and glean the information from them.
I have two buttons that will go forward an entry and backward and entry
respectively.
I am making a function that will populate the fields, but I don't know how to
access data in each field.
Say I want to get entry 25. Coincidentally the 25th entry would be the main
nodes 25th child. How do I get the other information?
Here is the code I have so far:
function display(identifier){
myNodeD = startP.childNodes[identifier].childNodes[0]
Pdate.text = myNodeD.childNodes[0].nodeValue;
Pdate.text += myNodeD.childNodes[1].nodeValue;
Pdate.text += myNodeD.childNodes[2].nodeValue;
Pdate.text += myNodeD.childNodes[3].nodeValue;
myNodeS = startP.childNodes[identifier].childNodes[1]
Pscript.text = myNodeS.childNodes[0].nodeValue;
Pscript.text = myNodeS.childNodes[1].nodeValue;
}
Thanks for any help.
krl