rem: var file = new LocalFile(rv.file, MODE_RDONLY); 
context:   importOPML: function()  {    var rv = pickOpen(this.mBundle.getString("subscribe-OPMLImportTitle"), '$xml $opml $all');    if(rv.reason == PICK_CANCEL)      return;         var file = new LocalFile(rv.file, MODE_RDONLY);    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(IPS);        // return if we couldn't open the file at all...    if(!file)            return promptService.alert(window, null, this.mBundle.getString("subscribe-errorOpeningFile"));    var text = file.read();      var parser = new DOMParser();    var opmlDom = parser.parseFromString(text, 'application/xml');    // return if the user didn't give us an OPML file    if(!opmlDom || !(opmlDom.documentElement.tagName == "opml"))      return promptService.alert(window, null, this.mBundle.getFormattedString("subscribe-errorInvalidOPMLFile", [rv.file.leafName]));    var outlines = opmlDom.getElementsByTagName("body")[0].getElementsByTagName("outline");    var feedsAdded = false;     for (var index = 0; index < outlines.length; index++)    {      var outline = outlines[index];           // XXX only dealing with flat OPML files for now.       // We still need to add support for grouped files.            if(outline.hasAttribute("xmlUrl") || outline.hasAttribute("url"))      {        var userAddedFeed = false;         var newFeedUrl = outline.getAttribute("xmlUrl") || outline.getAttribute("url")        var defaultQuickMode = this.mRSSServer.getBoolAttribute('quickMode');        var feedProperties = { feedName: this.findOutlineTitle(outline),                               feedLocation: newFeedUrl,                                serverURI: this.mRSSServer.serverURI,                                serverPrettyName: this.mRSSServer.prettyName,                                 folderURI: "",                                quickMode: this.mRSSServer.getBoolAttribute('quickMode')};        debug("importing feed: "+ feedProperties.feedName);               // Silently skip feeds that are already subscribed to.         if (!feedAlreadyExists(feedProperties.feedLocation, this.mRSSServer))        {          var feed = this.storeFeed(feedProperties);                 if(feed)          {            feed.title = feedProperties.feedName;            if(outline.hasAttribute("htmlUrl"))              feed.link = outline.getAttribute("htmlUrl");            feed.createFolder();            updateFolderFeedUrl(feed.folder, feed.url, false);                        // add feed adds the feed we have validated and downloaded to our datasource            // it also flushes the subscription datasource            addFeed(feed.url, feed.name, feed.folder);             feedsAdded = true;          }        }      }    }    if (!outlines.length || !feedsAdded)      return promptService.alert(window, null, this.mBundle.getFormattedString("subscribe-errorInvalidOPMLFile", [rv.file.leafName]));    //add the new feeds to our view    refreshSubscriptionView();  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/6120a011b6e53f99670974f5ffdf675139ba391e/feed-subscriptions.js/clean/mail/extensions/newsblog/content/feed-subscriptions.js