title: Converting xml text from webpage to json
body: <p>I'm trying to convert xml on a webpage to json. </p>
  
  <p>I used axios to grab the information from the URL and then used npm xml.js to try to convert the data to json.</p>
  
  <pre><code>let axios = require("axios");
  let convert = require("xml-js");
  let mtaURL = "http://advisory.mtanyct.info/eedevwebsvc/allequipments.aspx";
  
  axios.get(mtaURL)
  .then(response =&gt; {
      let results = convert.xml2json(response, {compact: false, spaces: 4}) 
      console.log(results);
  })
  </code></pre>
  
  <p>It came back with the following:</p>
  
  <pre><code>Error: Text data outside of root node.
  Line: 0
  Column: 59
  Char: x
  </code></pre>