It appears that I've found another case of "Flash does (this) great. EXCEPT . . . . . "
I've posted my issue on a couple forums with no replies. Rather than repost I'll just put the link here and hope SOMEBODY has an answer.
http://www.actionscript.org/forums/showthread.php3?p=1137057#post11370 57
oops, you're correct.
i fixed that in message 1 so, you can mark that as correct if you found it helpful.
there are 2 ways a namespace can be used in xml. the way you are using it, the namespace applies to each and every node within the xml.
to reference each of every node (but not attribute) you must use the namespace string:
trace(xml.s::responseDeclaration.s::mapping.s::mapEntry.@mapKey);
trace(xml.s::responseDeclaration.s::mapping.s::mapEntry.(@mapKey=="A") .@mappedValue);
One last question: Would it be possible to traverse the xml tags using tagnames stored in variables?
The only problem I see with this method is that it's very "static" to type in
xml.s::responseDeclaration.s::correctResponse.s::value
is there a way to say:
var correctAnswer = "responseDeclaration.s::correctResponse.s::value"
to then get
xml.s::child(correctAnswer);
That way dealing with changing xml structures could be handled in the variables section of my code.
North America
Europe, Middle East and Africa
Asia Pacific