๐จ๐จ Archived. Please see if @iptv/xmltv can fulfil your needs, you will need to write a serializer to output JSON:API structure.
Make use of JSON:API's relationship model to work with XMLTV data
$ yarn add xmltv-to-jsonapi
const fs = require('fs');
const xmltvToJsonapi = require('xmltv-to-jsonapi');
const xmltvData = fs.readFileSync('examples/epg.xml', 'utf-8');
(async () => {
const result = await xmltvToJsonapi(xmltvData);
// do something with your json
})();
Type: string | buffer
Takes in the XMLTV data as a string or file buffer