Search for an item in the news feed channel which matches the
unique identifier.
Syntax
object.FindItem( Value, [Options] )
Parameters
- Value
- A string which specifies the value of the news item being
searched for. This value should uniquely identify the item in the
feed, and this parameter cannot be an empty string.
- Options
- An optional numeric parameter that specifies one or more
options when searching for a news item. This parameter is
constructed by using a bitwise operator with any of the following
values:
Value |
Constant |
Description |
1 |
rssFindGuid |
Search the feed for an item with a matching GUID property
value. This is the default option, and is the only item
property that is guaranteed to be unique in the feed. The
search is case-sensitive, requiring that the Value
parameter match the GUID property value for the news item
exactly. |
2 |
rssFindLink |
Search the feed for items with a matching link property
value. For feeds that do not specify a GUID property, this is
the recommended option for searching for an item. The search is
not case-sensitive. |
4 |
rssFindTitle |
Search the feed for items with a matching title. This
option should not be used if you must ensure that the item
returned is unique in the feed because there may be multiple
items with the same title in the feed. The search is not
case-sensitive. |
8 |
rssFindPubDate |
Search the feed for items with a matching publishing date.
This option should not be used if you must ensure that the item
returned is unique in the feed because more than one item may
have the same publishing date. The format of the date string
must match the standard format used with the RSS protocol and
the match is not case-sensitive. |
Return Value
A value of zero is returned if the news item was found. Otherwise,
a non-zero error code is returned which indicates the cause of the
failure. If the method fails, the value of the LastError
property can be used to determine cause of the failure.
Remarks
The FindItem method searches for an item in the news feed
channel which matches the unique identifier (GUID) value and returns
information about that item. If this method is successful, the
current news item is changed to the item that was found and property
values such as ItemLink and ItemText will be updated.
If this method fails, the current news item is not changed.
It is recommended that you use this method with news feeds that
are using version 2.0 or later of the RSS specification. If the feed
uses an earlier version, items may not include a GUID property. It is
also possible that a feed may omit the GUID property even though it
is considered a requirement for the current RSS specification. For
the broadest compatibility with all news feeds, an application should
not depend on being able to search for a specific news feed item by
its GUID.
See Also
Close Method,
GetItem Method, Open
Method, Parse Method
|