title: Display XML object that also contains a list in AngularJs
body: <p>I am receiving xml data from an API. The xml object goes something like this:</p>
  
  <pre><code>&lt;OrderHeader xmlns="xml.org"&gt;
  &lt;ResponseCode&gt;1000&lt;/ResponseCode&gt;
  &lt;Message&gt;Order Received&lt;/Message&gt;
  &lt;OrderId&gt;10230192&lt;/OrderId&gt;
  &lt;lstOrderTracking&gt;
      &lt;OrderTracking&gt;
           &lt;TrackingStatus&gt;Order Received &lt;/TrackingStatus&gt;
           &lt;Address&gt; ABC &lt;/Address&gt;
           &lt;Other&gt; And some other stuff &lt;/Other&gt;
      &lt;/OrderTracking&gt;
      &lt;OrderTracking&gt;
           &lt;TrackingStatus&gt;Order Complete &lt;/TrackingStatus&gt;
           &lt;Address&gt; ABC &lt;/Address&gt;
           &lt;Other&gt; And some other stuff &lt;/Other&gt;
      &lt;/OrderTracking&gt;
  &lt;/lstOrderTracking&gt;
  &lt;/OrderHeader&gt;
  </code></pre>
  
  <p>I am able to display Header fields successfully but no luck in displaying the list items.</p>
  
  <p>This is my code:</p>
  
  <pre><code>$scope.result = response;
  
  if (window.DOMParser)
  {
       parser=new DOMParser();
       xmlDoc=parser.parseFromString(response,"text/xml");
  }
  else // Internet Explorer
  {
       xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
       xmlDoc.async=false;
       xmlDoc.loadXML(response);
  }
  $scope.ResponseCode = xmlDoc.getElementsByTagName("ResponseCode")[0].childNodes[0].nodeValue;
  $scope.Message = xmlDoc.getElementsByTagName("Message")[0].childNodes[0].nodeValue;
  $scope.OrderId = xmlDoc.getElementsByTagName("OrderId")[0].childNodes[0].nodeValue;
  
  $scope.data = response;
  </code></pre>
  
  <p>And in HTML:</p>
  
  <pre><code>&lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  ResponseCode
              &lt;/td&gt;
              &lt;td&gt;
                  {{ResponseCode}}
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  Message
              &lt;/td&gt;
              &lt;td&gt;
                  {{Message}}
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  OrderID
              &lt;/td&gt;
              &lt;td&gt;
                  {{OrderId}}
              &lt;/td&gt;
          &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;div ng-repeat="x in data.lstOrderTracking.OrderTracking"&gt;
        {{x.TrackingStatus}}
  &lt;/div&gt;
  </code></pre>
  
  <p>How to do I display list items? And is there a better way to parse XML in Angular?</p>