title: Angular x2js xml not defined
body: <p>I'm tryin to make <a href="http://motyar.blogspot.com.tr/2014/08/how-to-parse-xml-in-angular-js.html" rel="nofollow">this example</a> to use xml as json data. But i ve some problem about these code.</p>
  
  <pre><code>courses  = x2js.xml_str2json(data);
  console.log(courses.books.course);
  $scope.todos =courses.books.course;
  </code></pre>
  
  <p>In the xml of example. There are books and course tag. But i didnt understand where is 'courses' come from. </p>
  
  <p>I'm tryin to do same example with this xml example</p>
  
  <pre><code>&lt;diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&gt;
   &lt;DocumentElement xmlns=""&gt;
    &lt;semt_kodlari diffgr:id="semt_kodlari1" msdata:rowOrder="0"&gt;
     &lt;semt_adi&gt;ALTIKAT&lt;/semt_adi&gt;
    &lt;/semt_kodlari&gt;
   &lt;/DocumentElement&gt;
  &lt;/diffgr:diffgram&gt;
  </code></pre>
  
  <p>And here is my HTML part:</p>
  
  <pre><code>X = x2js.xml_str2json(data);
  console.log(X.DocumentElement.semt_kodlari);
  $scope.todos = X.DocumentElement.semt_kodlari;
  </code></pre>
  
  <p>When i run this code i take the "Cannot read property 'semt_kodlari' of undefined" error. So can somebody tell me what is wrong in my code and What is the diffrence about course and course's' ?</p>