title: XML to JSON converter xml_str2json returns null?
body: <p>When I use following code: </p>
  
  <pre><code>$http.get("http://246e90f2.tunnel.org.cn/yii2-basic/web/index.php?r=duangorder/restorder").success(function (data) {
                  var x2js = new X2JS();
                  var jsonData = x2js.xml_str2json(data);
                  console.log("debug", data);
                  console.log("debug", jsonData);
              });
  </code></pre>
  
  <p>jsonData is null, it seems related to my xml output from the link:
  <a href="http://246e90f2.tunnel.org.cn/yii2-basic/web/index.php?r=duangorder/restorder" rel="nofollow">http://246e90f2.tunnel.org.cn/yii2-basic/web/index.php?r=duangorder/restorder</a> （link might be unavilable due to ngrok）</p>
  
  <pre><code>&lt;response&gt;
  &lt;item&gt;
  &lt;id&gt;1&lt;/id&gt;
  &lt;token&gt;gh_9831478f66cb&lt;/token&gt;
  &lt;order_id&gt;143978240336383&lt;/order_id&gt;
  &lt;openid&gt;oPuB9wkVKTXn9AZ9idM-XqhUvxh0&lt;/openid&gt;
  &lt;table_id&gt;0&lt;/table_id&gt;
  &lt;ctime&gt;1439782403&lt;/ctime&gt;
  &lt;phone&gt;13211675827&lt;/phone&gt;
  &lt;address&gt;云南昆明 详细地址&lt;/address&gt;
  &lt;remark/&gt;
  &lt;detail&gt;
  {"4":{"num":2,"id":"4","name":"\u86cb\u7092\u996d","price":"10.00","total":20},"6":{"num":1,"id":"6","name":"\u626c\u5dde\u7092\u996d","price":"10.00","total":"10.00"},"5":{"num":1,"id":"5","name":"\u51b0\u6dc7\u51cc","price":"8.00","total":"8.00"}}
  &lt;/detail&gt;
  &lt;name&gt;霆鈞&lt;/name&gt;
  &lt;processed&gt;0&lt;/processed&gt;
  &lt;paid&gt;0&lt;/paid&gt;
  &lt;/item&gt;
  &lt;item&gt;
  &lt;id&gt;2&lt;/id&gt;
  &lt;token&gt;gh_9831478f66cb&lt;/token&gt;
  &lt;order_id&gt;143979224136359&lt;/order_id&gt;
  &lt;openid&gt;oPuB9wkVKTXn9AZ9idM-XqhUvxh0&lt;/openid&gt;
  &lt;table_id&gt;0&lt;/table_id&gt;
  &lt;ctime&gt;1439792241&lt;/ctime&gt;
  &lt;phone&gt;13211675827&lt;/phone&gt;
  &lt;address&gt;云南昆明 详细地址&lt;/address&gt;
  &lt;remark/&gt;
  &lt;detail&gt;
  {"4":{"num":1,"id":"4","name":"\u86cb\u7092\u996d","price":"10.00","total":"10.00"}}
  &lt;/detail&gt;
  &lt;name&gt;霆鈞&lt;/name&gt;
  &lt;processed&gt;0&lt;/processed&gt;
  &lt;paid&gt;0&lt;/paid&gt;
  &lt;/item&gt;
  &lt;item&gt;
  &lt;id&gt;3&lt;/id&gt;
  &lt;token&gt;gh_9831478f66cb&lt;/token&gt;
  &lt;order_id&gt;143995577636336&lt;/order_id&gt;
  &lt;openid&gt;oPuB9wkVKTXn9AZ9idM-XqhUvxh0&lt;/openid&gt;
  &lt;table_id&gt;0&lt;/table_id&gt;
  &lt;ctime&gt;1439955776&lt;/ctime&gt;
  &lt;phone&gt;13211675827&lt;/phone&gt;
  &lt;address&gt;云南昆明 锦苑花园32幢202室&lt;/address&gt;
  &lt;remark&gt;快点哦&lt;/remark&gt;
  &lt;detail&gt;
  {"5":{"num":2,"id":"5","name":"\u51b0\u6dc7\u51cc","price":"8.00","total":16}}
  &lt;/detail&gt;
  &lt;name&gt;霆鈞&lt;/name&gt;
  &lt;processed&gt;0&lt;/processed&gt;
  &lt;paid&gt;0&lt;/paid&gt;
  &lt;/item&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>but i've tried following link and my xml is valid:
  <a href="http://www.xmlvalidation.com/index.php?id=1&amp;L=0" rel="nofollow">http://www.xmlvalidation.com/index.php?id=1&amp;L=0</a></p>
  
  <p>I want to know where the problem is? thanks.</p>