The lzDataPointer object is what you want.
*<datapointer id="mydp" xpath="*websongs*:/songs/song[1]"/>*
....
this.setSource(*mydp.getNodeText()*);
z
On 1/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
HI All:
I wasn't able to figure out how to extract and expand a dataset value.
I tried to adapt the datapointer example or xpathQuery stuff but didn't
succesd on that either.
So if the music_list I get from the server is something like:
<songs>
<song>../music/where_to_begin.mp3</song>
<song>../music/over_sensitive.mp3</song>
<song>../music/choofenhoufen.mp3</song>
</songs>
How do I extract and play values in the dataset? In the enclosed lzx,
what is the right way to set the source to a value in the dataset?
--------------------------------------------------------------
<canvas>
<dataset name="websongs" src="http:/m2/music_list" request="true"/>
<view name ="music" >
<method name="load_hardcoded">
this.setSource('../music/where_to_begin.mp3');
</method>
<method name="load_from_dataset">
this.setSource( DON'T KNOW HOW TO EXTRACT THIS FROM THE DATASET);
</method>
<button name="hardcoded_button" onclick="this.parent.load_hardcoded
();">
Load Hardcoded
</button>
<button name="dataset_button" onclick="this.parent.load_from_dataset
();">
Load From Dataset
</button>
<simplelayout />
</view>
</canvas>
-----------------------------------------------------------
Thanks in advance!
Forrest