I am working in flash 8 and using an xml file that looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<lessons>
<lesson no="1" book="1" title="The Tree" ref="Chapter 1" />
<lesson no="2" book="1" title="House" ref="Chapter 2" />
<lesson no="3" book="1" title="Tim’s Birthday Surprise" ref="Chapter 4" />
<lesson no="4" book="1" title="Where Have You Been?" ref="Library" />
<lesson no="5" book="1" title="The Great Finish" ref="Chapter 2" />
<lesson no="6" book="1" title="Super" ref="Chapter 10" />
</lesssons>
I have set some variables like this:
no=""
book=""
title=""
ref=""
var lsn=3
How could I use the "lsn" variable to obtain the value of all the attributes of lesson no 3 node to get the right values for the variables: no, book, title, and ref?
Final result should be
Thanks.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<lessons>
<lesson no="1" book="1" title="The Tree" ref="Chapter 1" />
<lesson no="2" book="1" title="House" ref="Chapter 2" />
<lesson no="3" book="1" title="Tim’s Birthday Surprise" ref="Chapter 4" />
<lesson no="4" book="1" title="Where Have You Been?" ref="Library" />
<lesson no="5" book="1" title="The Great Finish" ref="Chapter 2" />
<lesson no="6" book="1" title="Super" ref="Chapter 10" />
</lesssons>
I have set some variables like this:
no=""
book=""
title=""
ref=""
var lsn=3
How could I use the "lsn" variable to obtain the value of all the attributes of lesson no 3 node to get the right values for the variables: no, book, title, and ref?
Final result should be
Thanks.