SimplePie::set_raw_data()publicWP 1.0

Set the raw XML data to parse

Allows you to use a string of RSS/Atom data instead of a remote feed.

If you have a feed available as a string in PHP, you can tell SimplePie to parse that data string instead of a remote feed. Any set feed URL takes precedence.

Method of the class: SimplePie{}

No Hooks.

Return

null. Nothing.

Usage

$SimplePie = new SimplePie();
$SimplePie->set_raw_data( $data );
$data(string) (required)
RSS or Atom data as a string.

Notes

  • See: set_feed_url()

Changelog

Since 1.0 Introduced.
Since 1.0 Beta 3

SimplePie::set_raw_data() code WP 6.1.1

public function set_raw_data($data)
{
	$this->raw_data = $data;
}