davereader.js
function convertOutline (jstruct) { //7/16/14 by DW
				var theNewOutline = {}, atts, subs;
				if (jstruct ["source:outline"] != undefined) {
					if (jstruct ["@"] != undefined) {
						atts = jstruct ["@"];
						subs = jstruct ["source:outline"];
						}
					else {
						atts = jstruct ["source:outline"] ["@"];
						subs = jstruct ["source:outline"] ["source:outline"];
						}
					}
				else {
					atts = jstruct ["@"];
					subs = undefined;
					}
				for (var x in atts) {
					theNewOutline [x] = atts [x];
					}
				if (subs != undefined) {
					theNewOutline.subs = [];
					if (subs instanceof Array) {
						for (var i = 0; i < subs.length; i++) {
							theNewOutline.subs [i] = convertOutline (subs [i]);
							}
						}
					else {
						theNewOutline.subs = [];
						theNewOutline.subs [0] = {};
						for (var x in subs ["@"]) {
							theNewOutline.subs [0] [x] = subs ["@"] [x];
							}
						}
					}
				return (theNewOutline);
				}
function convertOutline (jstruct) { //7/16/14 by DW
				var theNewOutline = {}, atts, subs;
				if (jstruct ["source:outline"] != undefined) {
					if (jstruct ["@"] != undefined) {
						atts = jstruct ["@"];
						subs = jstruct ["source:outline"];
						}
					else {
						atts = jstruct ["source:outline"] ["@"];
						subs = jstruct ["source:outline"] ["source:outline"];
						}
					}
				else {
					atts = jstruct ["@"];
					subs = undefined;
					}
				for (var x in atts) {
					theNewOutline [x] = atts [x];
					}
				if (subs != undefined) {
					theNewOutline.subs = [];
					if (subs instanceof Array) {
						for (var i = 0; i < subs.length; i++) {
							theNewOutline.subs [i] = convertOutline (subs [i]);
							}
						}
					else {
						theNewOutline.subs = [];
						theNewOutline.subs [0] = {};
						for (var x in subs ["@"]) {
							theNewOutline.subs [0] [x] = subs ["@"] [x];
							}
						}
					}
				return (theNewOutline);
				}
function convertOutline ( jstruct ) { //7/16/14 by DW var theNewOutline = { } , atts , subs ; if ( jstruct [ "source:outline" ] != undefined ) { if ( jstruct [ "@" ] != undefined ) { atts = jstruct [ "@" ] ; subs = jstruct [ "source:outline" ] ; } else { atts = jstruct [ "source:outline" ] [ "@" ] ; subs = jstruct [ "source:outline" ] [ "source:outline" ] ; } } else { atts = jstruct [ "@" ] ; subs = undefined ; } for ( var x in atts ) { theNewOutline [ x ] = atts [ x ] ; } if ( subs != undefined ) { theNewOutline . subs = [ ] ; if ( subs instanceof Array ) { for ( var i = 0 ; i < subs . length ; i ++ ) { theNewOutline . subs [ i ] = convertOutline ( subs [ i ] ) ; } } else { theNewOutline . subs = [ ] ; theNewOutline . subs [ 0 ] = { } ; for ( var x in subs [ "@" ] ) { theNewOutline . subs [ 0 ] [ x ] = subs [ "@" ] [ x ] ; } } } return ( theNewOutline ) ; }
copy selected elements from the object from feedparser, into the item for the river
copy selected elements from the object from feedparser into the item for the river