title: Get boolean variable from XML (not string)
body: <p>Is it possible with Javascript (or jQuery to make example easier) get boolean variable from some field in XML?
  If so - how it should be written in XML and what actions should be made on client side?</p>
  
  <p>Please check the following code:</p>
  
  <pre><code>$(document).ready(function(){
      var data = "&lt;?xml version='1.0' encoding='utf-8' ?&gt;&lt;data&gt;&lt;event id='2'&gt;&lt;text&gt;&lt;![CDATA[Hello there]]&gt;&lt;/text&gt;&lt;bool1&gt;true&lt;/bool1&gt;&lt;bool2&gt;false&lt;/bool2&gt;&lt;/event&gt;&lt;/data&gt;";
      var xmlDoc = $.parseXML(data);
      var $xml = $(xmlDoc);
      var bool = data.find("bool1").text(); // "true" - string
  });
  </code></pre>
  
  <p>What I would like here is to get string for the 'test' field and boolean for 'bool1'/'bool2'.</p>
  
  <p>Thank you.</p>
  
  <p><strong>Update:</strong> So one either have to set up XML scheme or simply make direct comparisons ( === 'false' / === 'true' ) and convert that way to boolean.</p>