XML Parsing in JavaScript With xml2js

Most web APIs these days are JSON APIs. JSON is fantastic, and very easy to work with. However older web APIs still use XML, and that can be a problem when you’re a JavaScript developer. Using the xml2js package, we can convert an XML string to a JavaScript object – making our lives much easier as JavaScript developers.