FeedTools syntax question

in the above feed, can anyone tell me how to access the
openSearch:totalResults element using feed tools? I can access the other
elements, but I’m unsure what special meaning the colon carries or how
to
work with such items in feedtools

thanks in advance
al

“Alan B.” [email protected] wrote

Affordable Life Insurance quotes, Compare Term Insurance Plans

whilst I’m on the topic of feedtools, has anyone been able to use it
with
the google web results from opensearch? I can’t find the URL for the rss
feed for it…

The colon in an xml tag signifies a namespace. “openSearch” would be the
namespace prefix
and all tags in the document with that prefix are in that namespace.

If you look at the root element it declares the namespace:

xmlns:openSearch=“http://a9.com/-/spec/opensearchrss/1.0/

Note that the URL there is just being used as a URI… a unique
identifier for the
namespace. Giving it the prefix allows you to use the prefix in the tags
instead of having
to stick that whole URI in every tag in the namespace.

I don’t know anything about feedtools, but hopefully it has some
facility for dealing with
namespaces… Any decent XML library should.

b

Affordable Life Insurance quotes, Compare Term Insurance Plans

in the above feed, can anyone tell me how to access the
openSearch:totalResults element using feed tools? I can access the other
elements, but I’m unsure what special meaning the colon carries or how
to work with such items in feedtools
feed =
FeedTools::Feed.open(‘Affordable Life Insurance quotes, Compare Term Insurance Plans’)
puts feed.find_node(‘openSearch:totalResults’).text

‘feed’ can be used as a simple REXML object