rem: var entryNodes = feedDocument.getElementsByTagName("entry"); 
add: var entryNodes = feedDocument.getElementsByTagNameNS(ATOM_NS, "entry"); 
context: 	parse: function(feedDocument)	{		var Feed = new Components.Constructor("@sage.mozdev.org/sage/feed;1", "sageIFeed", "init");		var FeedItem = new Components.Constructor("@sage.mozdev.org/sage/feeditem;1", "sageIFeedItem", "init");		var FeedItemEnclosure = new Components.Constructor("@sage.mozdev.org/sage/feeditemenclosure;1", "sageIFeedItemEnclosure", "init");		var dateParser = Components.classes["@sage.mozdev.org/sage/dateparser;1"].getService(Components.interfaces.sageIDateParser);				var xmlSerializer = Components.classes["@mozilla.org/xmlextras/xmlserializer;1"].getService(Components.interfaces.nsIDOMSerializer);		var Logger = new Components.Constructor("@sage.mozdev.org/sage/logger;1", "sageILogger", "init");		var logger = new Logger();			const nsIURIFixup = Components.interfaces.nsIURIFixup;		const URIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"].getService(nsIURIFixup);			var title;		var link;		var description;		var author;		var feedURI;		var format;				var firstElement = feedDocument.documentElement;			if (firstElement.hasAttribute("xmlns") && firstElement.getAttribute("xmlns") == "http://www.w3.org/2005/Atom") {			format = "Atom (1.0)";		} else if (firstElement.hasAttribute("version")) {			format = "Atom (" + firstElement.getAttribute("version") + ")";		} else {			format = "Atom (?)";		}				// xml:base support for <feed> element		var baseURI;		if (firstElement.hasAttribute("xml:base")) {			baseURI = firstElement.getAttribute("xml:base");		}				var i, j, z;			for (i = feedDocument.documentElement.firstChild; i != null; i = i.nextSibling) {			if (i.nodeType != i.ELEMENT_NODE) continue;			switch(i.localName) {				case "title":					if (i.hasAttribute("type") && (i.getAttribute("type").toLowerCase() == "html" || i.getAttribute("type").toLowerCase() == "xhtml")) {						title = this._entityDecode(this._getInnerText(i));					} else {						title = this._getInnerText(i);					}					break;				case "link":					if ((i.hasAttribute("rel") && i.getAttribute("rel").toLowerCase() == "alternate") || !i.hasAttribute("rel")) {						if (baseURI) {							link = URIFixup.createFixupURI(baseURI, nsIURIFixup.FIXUP_FLAG_NONE).resolve(i.getAttribute("href"));						} else {							link = i.getAttribute("href");						}					}					break;				case "subtitle":				case "tagline":					if (i.hasAttribute("type") && (i.getAttribute("type").toLowerCase() == "html" || i.getAttribute("type").toLowerCase() == "xhtml")) {						description = this._entityDecode(this._getInnerText(i));					} else {						description = this._getInnerText(i);					}					break;				case "name":					if (i.hasAttribute("type") && (i.getAttribute("type").toLowerCase() == "html" || i.getAttribute("type").toLowerCase() == "xhtml")) {						author = this._entityDecode(this._getInnerText(i));					} else {						author = this._getInnerText(i);					}					break;/*				case "copyright":					this.footer.copyright = this._entityDecode(this._getInnerText(i));					break;				case "generator":					this.footer.generator = this._entityDecode(this._getInnerText(i));					break;*/			}		}				feed = new Feed(title, link, description, author, feedURI, format);			var entryNodes = feedDocument.getElementsByTagName("entry");		var node;		for (i = 0; entryNodes.length > i; i++) {			var item = {title:"", link:"", author:"", content:"", pubDate:"", enclosure: null, baseURI:""};						// xml:base support for <entry> element			if (entryNodes[i].hasAttribute("xml:base")) {				if (baseURI) {					item.baseURI = URIFixup.createFixupURI(baseURI, nsIURIFixup.FIXUP_FLAG_NONE).resolve(entryNodes[i].getAttribute("xml:base"));				} else {					item.baseURI = entryNodes[i].getAttribute("xml:base");				}			}				var titleNodes = entryNodes[i].getElementsByTagName("title");			if (titleNodes.length) {				node = titleNodes[0];				if (node.hasAttribute("type") && (node.getAttribute("type").toLowerCase() == "html" || node.getAttribute("type").toLowerCase() == "xhtml")) {					item.title = this._entityDecode(this._getInnerText(node));				} else {					item.title = this._getInnerText(node);				}			}				var linkNodes = entryNodes[i].getElementsByTagName("link");			if (linkNodes.length) {				for (j = 0; j < linkNodes.length; j++) {					if (!linkNodes[j].hasAttribute("rel") || linkNodes[j].getAttribute("rel").toLowerCase() == "alternate") {						item.link = item.baseURI ? URIFixup.createFixupURI(item.baseURI, nsIURIFixup.FIXUP_FLAG_NONE).resolve(linkNodes[j].getAttribute("href")) : linkNodes[j].getAttribute("href");						break;					}				}			}				var authorNodes = entryNodes[i].getElementsByTagName("author");			if (authorNodes.length) {				node = authorNodes[0];				if (node.hasAttribute("type") && (node.getAttribute("type").toLowerCase() == "html" || node.getAttribute("type").toLowerCase() == "xhtml")) {					item.author = this._entityDecode(this._getInnerText(node));				} else {					item.author = this._getInnerText(node);				}			}				var updatedNodes = entryNodes[i].getElementsByTagName("updated");			if (updatedNodes.length) {				tmp_str = this._getInnerText(updatedNodes[0]);				try {					item.pubDate = dateParser.parseISO8601(tmp_str);				} catch(e) {					logger.warn("unable to parse ISO 8601 date string: " + tmp_str + " feed: " + title);				}			}				var issuedNodes = entryNodes[i].getElementsByTagName("issued");			if (issuedNodes.length && !updatedNodes.length) {				tmp_str = this._getInnerText(issuedNodes[0]);				try {					item.pubDate = dateParser.parseISO8601(tmp_str);				} catch(e) {					logger.warn("unable to parse ISO 8601 date string: " + tmp_str + " feed: " + title);				}			}				var aEntryNode = entryNodes[i];				var contentNodes = aEntryNode.getElementsByTagName("content");			var contentHash = {};			var contentString;			for(j = 0; j < contentNodes.length; j++) {				var contType = contentNodes[j].getAttribute("type");				if(contType == "application/xhtml+xml" || contType == "xhtml") {					contentString = "";					for(z = 0; z < contentNodes[j].childNodes.length; z++) {						contentString += xmlSerializer.serializeToString(contentNodes[j].childNodes[z]);					}				} else {					contentString = this._getInnerText(contentNodes[j]);				}				contentHash[contType] = contentString;			}				var summaryNodes = aEntryNode.getElementsByTagName("summary");				if ("application/xhtml+xml" in contentHash) {				item.content = contentHash["application/xhtml+xml"];			} else if ("xhtml" in contentHash) {				item.content = contentHash["xhtml"];			} else if ("text/html" in contentHash) {				item.content = contentHash["text/html"];			} else if ("html" in contentHash) {				item.content = contentHash["html"];			} else if ("text/plain" in contentHash) {				item.content = this._entityEncode(contentHash["text/plain"]);			} else if ("text" in contentHash) {				item.content = this._entityEncode(contentHash["text"]);			} else if (summaryNodes.length) {				item.content = this._entityEncode(this._getInnerText(summaryNodes[0]));			}						var feedItem = new FeedItem(item.title, item.link, item.author, item.content, item.pubDate, item.enclosure, item.baseURI);				feed.addItem(feedItem);		}				return feed;	},
meta: 359	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/359/836ce75233e021be771dd4ee7e1780953b94a1e2/sageAtomParser.js/clean/src/components/sageAtomParser.js