title: xml2js in Angular 6: Can't resolve 'stream' and 'timers'
body: <p>I would like to parse xml data, retrieved from the server. Unfortunately <code>HttpClient</code> does not support xml, only json, therefore I installed the package <code>xml2js</code>:</p>
  
  <pre><code>npm install xml2js --save
  npm install @types/xml2js --save-dev
  </code></pre>
  
  <p>Then I try to use it like this:</p>
  
  <pre><code>import {Parser} from 'xml2js';
  
  Parser.parseString(xml_str, function (err, result) {
      console.dir(result);
  });
  </code></pre>
  
  <p>I get these two errors if I run it:</p>
  
  <pre><code>WARNING in ./node_modules/xml2js/node_modules/sax/lib/sax.js
  Module not found: Error: Can't resolve 'stream' in 'C:\projects\app\node_modules\xml2js\node_modules\sax\lib'
  
  ERROR in ./node_modules/xml2js/lib/parser.js
  Module not found: Error: Can't resolve 'timers' in 'C:\projects\app\node_modules\xml2js\lib'
  </code></pre>
  
  <p>I haven't found any solutions to this problem, maybe it is an Angular6 issue only. Is there any way, to parse xml in Angular6?</p>