title: How to parse XML from URL with Node
body: <p>I am using <a href="https://github.com/Leonidas-from-XIV/node-xml2js" rel="noreferrer">node-xml2js</a> to parse XML. I am having trouble parsing XML from a URL. I've used this <a href="https://stackoverflow.com/a/16763530/640508">SO answer</a> as a model. But when I use the code below, I get <code>null</code> as the result. Any thoughts on what I'm doing wrong?</p>
  
  <p>UPDATE: I've updated the url for the xml to the actual site used.</p>
  
  <pre><code>var eyes = require('eyes');
  var https = require('https');
  var fs = require('fs');
  var xml2js = require('xml2js');
  var parser = new xml2js.Parser();
  
  parser.addListener('end', function(result) {
    eyes.inspect(result);
    console.log('Done.');
  });
  
  https.get('https://tsdrapi.uspto.gov/ts/cd/casestatus/sn78787878/info.xml', function(result) {
    result.on('data', function (data) {
      parser.parseString(data);
      });
    }).on('error', function(e) {
    console.log('Got error: ' + e.message);
  });
  </code></pre>