title: How to get data from XML parser in nodeJS
body: <p>I try to use nodeJS to get access to all data from an XML stored as a string in my code for now. Actually, I succeeded only getting access to the main node but not all children when i wanted to get deeper.</p>
  
  <p>Here is my code, and I try to get all data in ms:IDENT node.</p>
  
  <pre class="lang-js prettyprint-override"><code>var http = require('http');
  var xml2js = require('xml2js');
  
  var extractedData = "";
  var parser = new xml2js.Parser();
  
  var xml = "&lt;wfs:FeatureCollection&gt;&lt;gml:boundedBy&gt;&lt;gml:Box srsName='EPSG:3945'&gt;&lt;gml:coordinates&gt;1399644.376399,4179041.966594 1426575.406024,4209057.424111&lt;/gml:coordinates&gt;&lt;/gml:Box&gt;&lt;/gml:boundedBy&gt;&lt;gml:featureMember&gt;&lt;ms:SV_ARRET_P fid='SV_ARRET_P.1484'&gt;&lt;gml:boundedBy&gt;&lt;gml:Box srsName='EPSG:3945'&gt;&lt;gml:coordinates&gt;1418152.331881,4208150.797551 1418152.331881,4208150.797551&lt;/gml:coordinates&gt;&lt;/gml:Box&gt;&lt;/gml:boundedBy&gt;&lt;ms:msGeometry&gt;&lt;gml:Point srsName='EPSG:3945'&gt;&lt;gml:coordinates&gt;1418152.331881,4208150.797551&lt;/gml:coordinates&gt;&lt;/gml:Point&gt;&lt;/ms:msGeometry&gt;&lt;ms:GID&gt;1484&lt;/ms:GID&gt;&lt;ms:GEOM_O&gt;196&lt;/ms:GEOM_O&gt;&lt;ms:IDENT&gt;FLA92A&lt;/ms:IDENT&gt;&lt;ms:GROUPE&gt;FLA92&lt;/ms:GROUPE&gt;&lt;ms:LIBELLE&gt;Fort Lajard&lt;/ms:LIBELLE&gt;&lt;ms:TYPE&gt;BUS&lt;/ms:TYPE&gt;&lt;ms:CDATE&gt;2017-01-06T14:15:10&lt;/ms:CDATE&gt;&lt;ms:MDATE&gt;2017-01-06T14:15:10&lt;/ms:MDATE&gt;&lt;/ms:SV_ARRET_P&gt;&lt;/gml:featureMember&gt;&lt;/wfs:FeatureCollection&gt;"
  
  parser.parseString(xml, function(err,result){
    //Extract the value from the data element
    xml = result['wfs:FeatureCollection'];
    parser.parseString(xml, function(err,result){
      extractedData = result['wfs:FeatureCollection']['gml:featureMember']['ms:SV_ARRET_P']['ms:IDENT'];
      console.log(extractedData);
    });
  });
  </code></pre>
  
  <p>Thank you for any help in advance</p>