nsIFeedProcessor

This interface parses RSS or Atom feeds, triggering callbacks based on their contents during and after the processing.
1.0
28
Introduced
Gecko 1.8.1
Inherits from: nsIStreamListener Last changed in Gecko 1.8.1 (Firefox 2 / Thunderbird 2 / SeaMonkey 1.1)

Implemented by: @mozilla.org/feed-processor;1. To create an instance, use:

var feedProcessor = Components.classes["@mozilla.org/feed-processor;1"]
                   .createInstance(Components.interfaces.nsIFeedProcessor);

Method overview

void parseAsync(in nsIRequestObserver requestObserver, in nsIURI uri);
void parseFromStream(in nsIInputStream stream, in nsIURI uri);
void parseFromString(in AString str, in nsIURI uri);

Attributes

Attribute Type Description
listener nsIFeedResultListener The feed result listener that will respond to feed events.

Methods

parseAsync()

Parses a feed asynchronously. The caller must then call the processor's nsIStreamListener methods to drive the parsing process. You must not call any of the other parsing methods on the nsIFeedProcessor interface during an asynchronous parse.

 void parseAsync(
   in nsIRequestObserver requestObserver,
   in nsIURI uri
 );
Parameters
requestObserver
The observer to be notified when parsing starts and stops. This can be null.
uri
The base URI against which any URIs in the feed are resolved.

parseFromStream()

Parses a feed from an nsIInputStream.

 void parseFromStream(
   in nsIInputStream stream,
   in nsIURI uri
 );
Parameters
stream
Pointer to the nsIInputStream from which to read and parse the feed.
uri
The base URI against which any URIs in the feed are resolved.

parseFromString()

Parses a feed from an AString.

 void parseFromString(
   in AString str,
   in nsIURI uri
 );
Parameters
str
The string to parse as a feed.
uri
The base URI against which any URIs in the feed are resolved.

See also

Interwiki link

Document Tags and Contributors

 Contributors to this page: Sheppy, mcomella, trevorh, Nickolay, Fredchat
 Last updated by: Sheppy,