XPATH help


i'm trying write little game in flash uses xml persistent storage of questions , answers. our e-learning developers can reuse game in various e-learning courses w/out having in flash. developed "standard" xml format handling questions , answers (and additional stuff hints , feedback), , used xml format in javascript-based game w/out trouble (using xpath relevant data out of xml file).

i'm having trouble getting xpath statements in actionscript work however.

in javascript, used statements like:

questionsarray[z]["thetext"]= questionnodes.item(z).selectsinglenode("thetext").text;
questionsarray[z]["thehint"]= questionnodes.item(z).selectsinglenode("hint").text;

, etc, questionnodes xml containing questions, create array of questions , answers.

when try same statements in actionscript (using think correct actionscript syntax), null results.

for example:
questionsarray[z]["thetext"]= xpathapi.selectsinglenode(questionnodes.item[z], "thetext");
questionsarray[z]["thehint"]= xpathapi.selectsinglenode(questionnodes.item[z], "hint");

for matter, can never trace put out when using item[ ] syntax. example, following undefined:

trace (questionnodes.item[1]);

i'm trying create array xml data, can't figure out how "walk through" xml data can in js.

any ideas? know xml loading because have other xpath statements have worked..

thanks advice! - mike







More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums