mirror of
https://github.com/LightAir/turbo-rss.git
synced 2026-02-04 03:56:19 +00:00
implemented functionality for custom namespaces
This commit is contained in:
@@ -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 || [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user