SimplePie 1.5 is now available!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » SimplePie Live! » API Reference » feed.title

feed.title

Description

Returns the title of the feed. Returns NULL when you're merging multiple feeds, so use feed.item.feed.title instead.

:!: Note that this object can only be accessed with feed when feed is set as the parameter in the onsuccess callback function. We're using feed generically in this reference to refer to the feed's data.

Availability

  • Available in the SimplePie Live public beta.

Examples

Assuming you've already included the base.js file as noted in Requirements and Getting Started

<script type="application/javascript">
 
var feed = new SimplePie('http://feeds.feedburner.com/simplepie', {
 
	// Handle a successful response.
	onSuccess: function(feed) {
 
		// Do something simple for this example code.
		if (feed.title) {
			window.alert(feed.title);
		}
	},
 
	// Handle a failed response.
	onFailure: function(feed) {
 
		// The error message is always in the error property.
		window.alert(feed.error);
	}
});
 
</script>

live/reference/feed.title.txt · Last modified: 2011/03/05 19:56 (external edit)