diff --git a/lib/rss.js b/lib/rss.js index a8110b9..c24f23b 100755 --- a/lib/rss.js +++ b/lib/rss.js @@ -108,6 +108,10 @@ function generateXML (data){ version: '2.0' }; + for(var name in data.customNamespaces) { + _attr['xmlns:' + name] = data.customNamespaces[name]; + } + //only add namespace if GeoRSS is true if(data.geoRSS){ _attr['xmlns:geo'] = 'http://www.w3.org/2003/01/geo/wgs84_pos#'; @@ -142,6 +146,7 @@ function RSS (options, items) { this.ttl = options.ttl; //option to return feed as GeoRSS is set automatically if feed.lat/long is used this.geoRSS = options.geoRSS || false; + this.customNamespaces = options.customNamespaces || {}; this.custom = options.custom || []; this.items = items || [];