nsIFeedProcessor
From MDC
The nsIFeedProcessor interface parses RSS or Atom feeds, triggering callbacks based on their contents during and after the processing.
Contents |
nsIFeedProcessor is defined in toolkit/components/feeds/public/nsIFeedProcessor.idl. It is scriptable and
unfrozen (hasn't changed since Mozilla 1.8.1).
Inherits from: nsIStreamListener
Implemented by: @mozilla.org/feed-processor;1. To create an instance, use:
var fp = Components.classes["@mozilla.org/feed-processor;1"]
.createInstance(Components.interfaces.nsIFeedProcessor);
[edit] 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);
|
[edit] Attributes
| Attribute | Type | Description |
listener
| nsIFeedResultListener
| The feed result listener that will respond to feed events. |
[edit] Methods
[edit] 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 );
[edit] 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.
[edit] parseFromStream()
Parses a feed from an nsInputStream.
void parseFromStream( in nsIInputStream stream, in nsIURI uri );
[edit] Parameters
- stream
- Pointer to the
nsInputStreamfrom which to read and parse the feed. - uri
- The base URI against which any URIs in the feed are resolved.
[edit] parseFromString()
Parses a feed from an AString.
void parseFromString( in AString str, in nsIURI uri );
[edit] Parameters
- str
- The string to parse as a feed.
- uri
- The base URI against which any URIs in the feed are resolved.