# Setting Boolean var from XML node

**URL:** <https://forum.kirupa.com/t/setting-boolean-var-from-xml-node/305713>\
**Category:** Uncategorized\
**Created:** [March 2, 2010, 2:31pm UTC](https://forum.kirupa.com/t/setting-boolean-var-from-xml-node/305713 "2010-03-02T14:31:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m2244](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@m2244](https://forum.kirupa.com/u/m2244)\
**Post date:** [March 2, 2010, 2:31pm UTC](https://forum.kirupa.com/t/setting-boolean-var-from-xml-node/305713/1 "2010-03-02T14:31:24Z")

</div>

I have an AS3 program that is loading an external XML file. I seem to be having a problem setting Boolean values from the nodes with true or false in them. When I set a Boolean var from a node in the XML it always traces as true. When I trace out all of the XML I can see that those nodes do indeed say false, but the trace shows true. I don’t seem to have this problem with uint and String, only Boolean. Can anyone help? I highlighted the problem node and Boolean trace below. Thanks in advance.

```auto

 
  <question type="multichoice" number="">
    <msbref>
      <textnode>1</textnode>
    </msbref>
    <questiontext>
      <textnode>2</textnode>
    </questiontext>
    <single>true</single>
    <shuffleanswers>[COLOR=red]false[/COLOR]</shuffleanswers>
 
var question1:String = loaded.question.questiontext.textnode; //traces 2.
var shuffleAns:Boolean = loaded.question.shuffleanswers; //traces [COLOR=red]true[/COLOR].
 

```
