nsIFeedProcessor 编辑
toolkit/components/feeds/public/nsIFeedProcessor.idl
Scriptable This interface parses RSS or Atom feeds, triggering callbacks based on their contents during and after the processing. 1.0 66 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 |
| 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论