Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xml:
- <bundle bundle_id="1">
- <question_type>0</question_type>
- <question id="1">Is Fred...?</question>
- <option id="1">Good</option>
- <option id="2">Bad</option>
- <option id="3">Ugly</option>
- </bundle>
- private function rebuildQuestion(e:ResultEvent):void{
- DynamicTest.debug(e.result.toString());
- // start rebuilding question
- var question_text:String = e.result.question
- var question_id:int = e.result.question.attribute('id');
- trace("question_text: " + question_text);
- trace("question_id: " + question_id);
- //and now answer options
- for each (var element:XML in e.result){
- DynamicTest.debug("element: " + element);
- if (element.child("option")){
- trace("option_text: " + element.child("option").text());
- trace("option_id: " + element.child("option").attribute('id'));
- }
- }
- WHY is that giving me this in my console?
- option_text: GoodBadUgly
- option_id: 123
Add Comment
Please, Sign In to add comment