title: XML data parsing in angular 2
body: <p>Im new to angularjs2 and typescript,in my project i have a string variable comtaining xml as string, i need to process the string and access the data in the string according to node in the XML.Im having tough time by googling.Please help me out.</p>
  
  <pre><code>&lt;groupDirectory&gt;
  &lt;directoryDetails&gt;
   &lt;userId&gt;extn5001&lt;/userId&gt;
   &lt;firstName&gt;Park&lt;/firstName&gt;
   &lt;lastName&gt;1&lt;/lastName&gt;
   &lt;groupId&gt;communications&lt;/groupId&gt;
   &lt;extension&gt;5001&lt;/extension&gt;
  &lt;/directoryDetails&gt;
  &lt;directoryDetails&gt;
   &lt;userId&gt;Yealinkt27ptest&lt;/userId&gt;
   &lt;firstName&gt;Yealink T&lt;/firstName&gt;
   &lt;lastName&gt;27P&lt;/lastName&gt;
   &lt;groupId&gt;communications&lt;/groupId&gt;
   &lt;extension&gt;4676&lt;/extension&gt;
  &lt;/directoryDetails&gt;
  &lt;groupDirectory&gt;
  </code></pre>
  
  <p>this is the xml i need to process.i need to access data according to nodes eg:name from </p>