title: How to parse XML using angular js?
body: <p>I want to parse XML using URL:<a href="http://callme.myshareus.nl/API/getGroups.php?APIkey=te7gRRT8Ut2VYW&amp;InitiatorId=0000001&amp;JobId=00000260&amp;Role=1" rel="nofollow">http://callme.myshareus.nl/API/getGroups.php?APIkey=te7gRRT8Ut2VYW&amp;InitiatorId=0000001&amp;JobId=00000260&amp;Role=1</a>
   in angular js.</p>
  
  <p>and output of XML is:</p>
  
  <pre><code>&lt;Groups&gt;
  &lt;entity no="1"&gt;
  &lt;SU val="GROUPID"&gt;000001&lt;/SU&gt;
  &lt;SU val="GROUPNAME"&gt;Rick Brusse group&lt;/SU&gt;
  &lt;/entity&gt;
  &lt;entity no="2"&gt;
  &lt;SU val="GROUPID"&gt;000027&lt;/SU&gt;
  &lt;SU val="GROUPNAME"&gt;MV Aseguradores group&lt;/SU&gt;
  &lt;/entity&gt;
  &lt;entity no="3"&gt;
  &lt;SU val="GROUPID"&gt;000095&lt;/SU&gt;
  &lt;SU val="GROUPNAME"&gt;test group 20-1-2012&lt;/SU&gt;
  &lt;/entity&gt;
  &lt;entity no="4"&gt;
  &lt;SU val="GROUPID"&gt;000096&lt;/SU&gt;
  &lt;SU val="GROUPNAME"&gt;test 1&lt;/SU&gt;
  &lt;/entity&gt;
  &lt;entity no="5"&gt;
  &lt;SU val="GROUPID"&gt;000106&lt;/SU&gt;
  &lt;SU val="GROUPNAME"&gt;test 2&lt;/SU&gt;
  &lt;/entity&gt;
  &lt;/Groups&gt;
  </code></pre>
  
  <p>I am trying</p>
  
  <pre><code>function loadXMLDoc(url)
  {
  var xmlhttp;
  var txt,xx,x,i;
  if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
      {
      txt="&lt;table border='1'&gt;&lt;tr&gt;&lt;th&gt;Title&lt;/th&gt;&lt;th&gt;Artist&lt;/th&gt;&lt;/tr&gt;";
      x=xmlhttp.responseXML.documentElement.getElementsByTagName("SU");
      for (i=0;i&lt;x.length;i++)
        {
        txt=txt + "&lt;tr&gt;";
        xx=x[i].getElementsByTagName("GROUPID");
          {
          try
            {
            txt=txt + "&lt;td&gt;" + xx[0].firstChild.nodeValue + "&lt;/td&gt;";
            }
          catch (er)
            {
            txt=txt + "&lt;td&gt;&amp;nbsp;&lt;/td&gt;";
            }
          }
      xx=x[i].getElementsByTagName("GROUPNAME");
        {
          try
            {
            txt=txt + "&lt;td&gt;" + xx[0].firstChild.nodeValue + "&lt;/td&gt;";
            }
          catch (er)
            {
            txt=txt + "&lt;td&gt;&amp;nbsp;&lt;/td&gt;";
            }
          }
        txt=txt + "&lt;/tr&gt;";
        }
      txt=txt + "&lt;/table&gt;";
      document.getElementById('txtCDInfo').innerHTML=txt;
      }
    }
  xmlhttp.open("GET",url,true);
  xmlhttp.send();
  }
  </code></pre>
  
  <p>And I am passing the url on clling of function,</p>
  
  <pre><code>loadXMLDoc('http://callme.myshareus.nl/API/getGroups.phpAPIkey=te7gRRT8Ut2VYW&amp;InitiatorId=0000001&amp;JobId=00000260&amp;Role=1');
  </code></pre>
  
  <p>Not woking.</p>