diff --git a/main.js b/main.js index e1dfda5..9729949 100644 --- a/main.js +++ b/main.js @@ -175,6 +175,7 @@ FeedParser.prototype.handleOpenTag = function (node){ this.xhtml['#'] += '>'; } else if ( this.stack.length === 0 && (n['#name'] === 'rss' || + (!this.meta['#type'] && n['#name'] === 'channel') || (n['#local'] === 'rdf' && utils.nslookup([n['#uri']], 'rdf')) || (n['#local'] === 'feed'&& utils.nslookup([n['#uri']], 'atom')) ) ) { Object.keys(n['@']).forEach(function(name) { @@ -189,6 +190,10 @@ FeedParser.prototype.handleOpenTag = function (node){ this.meta['#type'] = 'rss'; this.meta['#version'] = n['@']['version']; break; + case 'channel': + this.meta['#type'] = 'rss'; + this.meta['#version'] = n['@']['version']; + break; case 'rdf': this.meta['#type'] = 'rdf'; this.meta['#version'] = n['@']['version'] || '1.0';