context:   parseAsRSS2: function (aFeed, aDOM)   {    // Get the first channel (assuming there is only one per RSS File).    var parsedItems = new Array();    var channel = aDOM.getElementsByTagName("channel")[0];    if (!channel)      return aFeed.onParseError(aFeed);    aFeed.title = aFeed.title || getNodeValue(channel.getElementsByTagName("title")[0]);    aFeed.description = getNodeValue(channel.getElementsByTagName("description")[0]);    aFeed.link = getNodeValue(channel.getElementsByTagName("link")[0]);    if (!aFeed.parseItems)      return parsedItems;    aFeed.invalidateItems();    var itemNodes = aDOM.getElementsByTagName("item");    for (var i=0; i < itemNodes.length; i++)     {      var itemNode = itemNodes[i];      var item = new FeedItem();      item.feed = aFeed;      item.characterSet = "UTF-8";      var link = getNodeValue(itemNode.getElementsByTagName("link")[0]);      var guidNode = itemNode.getElementsByTagName("guid")[0];      var guid;      var isPermaLink;      if (guidNode)       {        guid = getNodeValue(guidNode);        isPermaLink = guidNode.getAttribute('isPermaLink') == 'false' ? false : true;      }      // getNodeValue returns unicode strings...      // we need to do the proper conversion on these before we call into      // item.Store();      item.url = link ? link : (guid && isPermaLink) ? guid : null;      item.id = guid;      item.description = getNodeValue(itemNode.getElementsByTagName("description")[0]);      item.title = getNodeValue(itemNode.getElementsByTagName("title")[0])                   || (item.description ? (this.stripTags(item.description).substr(0, 150)) : null)                   || item.title;      item.author = getNodeValue(itemNode.getElementsByTagName("author")[0]                                 || itemNode.getElementsByTagName("creator")[0])                                 || aFeed.title                                 || item.author;      item.date = getNodeValue(itemNode.getElementsByTagName("pubDate")[0]                               || itemNode.getElementsByTagName("date")[0])                               || item.date;          // If the date is invalid, users will see the beginning of the epoch      // unless we reset it here, so they'll see the current time instead.      // This is typical aggregator behavior.      if(item.date)      {        item.date = trimString(item.date);        if(!isValidRFC822Date(item.date))        {          // XXX Use this on the other formats as well          item.date = dateRescue(item.date);        }      }      var content = getNodeValue(itemNode.getElementsByTagNameNS(RSS_CONTENT_NS, "encoded")[0]);      // Handle an enclosure (if present)      var enclosureNode = itemNode.getElementsByTagName("enclosure")[0];      if (enclosureNode)        item.enclosure = new FeedEnclosure(enclosureNode.getAttribute("url"),                                           enclosureNode.getAttribute("type"),                                          enclosureNode.getAttribute("length"));      parsedItems[i] = item;    }    return parsedItems;  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/616fa6f3037218b91a385ed0436e4d8a6b950187/feed-parser.js/clean/mail/extensions/newsblog/content/feed-parser.js