<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8959671455961066636</id><updated>2012-02-16T23:18:43.556+11:00</updated><category term='xml'/><category term='rss php'/><category term='dom'/><category term='PHP Functions'/><category term='parsers'/><title type='text'>RSS PHP - Import RSS Feeds</title><subtitle type='html'>Your Own Automated Website - RSS Aggregation</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rssphp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://rssphp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>theme addict</name><uri>http://www.blogger.com/profile/00643766661601374606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8959671455961066636.post-3325628500317577924</id><published>2011-04-21T20:36:00.002+10:00</published><updated>2011-04-21T21:00:24.562+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rss php'/><category scheme='http://www.blogger.com/atom/ns#' term='dom'/><category scheme='http://www.blogger.com/atom/ns#' term='parsers'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>DOM to Parse XML and HTML</title><content type='html'>As you have seen we can easily use DOM to manipulate XML and HTML and it's really very very simple. &lt;br /&gt;&lt;br /&gt;You use the &lt;span style="font-weight:bold;"&gt;$node-&gt;getElementsByTagName('title')-&gt;item(0)-&gt;nodeValue &lt;/span&gt;, for instance the &amp;lt;title&amp;gt; tag, you can grab the title.&lt;br /&gt;&lt;br /&gt;If you have many nodes, you do a for each loop. Say you have 3 list items in &amp;lt;UL&amp;gt;, you can declare &lt;span style="font-weight:bold;"&gt;$listitems = $doc-&gt;getElementsByTagName('li')&lt;/span&gt;. &lt;br /&gt;Now we have a group of list items, all we have to do now is loop through them and get our stuff. &lt;span style="font-weight:bold;"&gt;for each ($listitems as $listitem){ $listitem_output = $listitem-&gt;item(0)-&gt;nodeValue; echo $listitem_output;}&lt;/span&gt;&lt;br /&gt;Isn't that great?&lt;br /&gt;&lt;br /&gt;Feel free to checkout some posts on how to get attributes using the getAttribute property from DOM, very exciting stuff this is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8959671455961066636-3325628500317577924?l=rssphp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rssphp.blogspot.com/feeds/3325628500317577924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rssphp.blogspot.com/2011/04/dom-to-parse-xml-and-html.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/3325628500317577924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/3325628500317577924'/><link rel='alternate' type='text/html' href='http://rssphp.blogspot.com/2011/04/dom-to-parse-xml-and-html.html' title='DOM to Parse XML and HTML'/><author><name>theme addict</name><uri>http://www.blogger.com/profile/00643766661601374606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8959671455961066636.post-1259404240973534651</id><published>2009-07-17T00:33:00.001+10:00</published><updated>2009-07-17T03:19:26.145+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Functions'/><title type='text'>RSS PHP: Tutorial #1</title><content type='html'>In this first &lt;span style="font-weight:bold;"&gt;RSS PHP&lt;/span&gt; Tutorial, we'll look at how PHP uses XML to &lt;span style="font-weight:bold;"&gt;parse the RSS file&lt;/span&gt;. &lt;br /&gt;&lt;br /&gt;Here's an example of parsing a &lt;span style="font-weight:bold;"&gt;RSS file&lt;/span&gt; using the function below.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;$rss_tags = array(&lt;br /&gt;‘title’,&lt;br /&gt;‘link’,&lt;br /&gt;‘guid’,&lt;br /&gt;‘comments’,&lt;br /&gt;‘description’,&lt;br /&gt;‘pubDate’,&lt;br /&gt;‘category’,&lt;br /&gt;);&lt;br /&gt;$rss_item_tag = ‘item’;&lt;br /&gt;$rss_url = ‘http://rssphp.blogspot.com/feeds/posts/default’;&lt;br /&gt;&lt;br /&gt;$rssfeed = rss_to_array($rss_item_tag,$rss_tags,$rss_url);&lt;br /&gt;&lt;br /&gt;print_r($rssfeed);&lt;br /&gt;&lt;br /&gt;function rss_to_array($tag, $array, $url) {&lt;br /&gt;$doc = new DOMdocument();&lt;br /&gt;$doc-&gt;load($url);&lt;br /&gt;$rss_array = array();&lt;br /&gt;$items = array();&lt;br /&gt;foreach($doc-&gt;getElementsByTagName($tag) AS $node) {&lt;br /&gt;foreach($array AS $key =&gt; $value) {&lt;br /&gt;$items[$value] = $node-&gt;getElementsByTagName($value)-&gt;item(0)-&gt;nodeValue;&lt;br /&gt;}&lt;br /&gt;array_push($rss_array, $items);&lt;br /&gt;}&lt;br /&gt;return $rss_array;&lt;br /&gt;}&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And there you have your own RSS parser. All we did was put the feed items into an array, now you do the rest!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8959671455961066636-1259404240973534651?l=rssphp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rssphp.blogspot.com/feeds/1259404240973534651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rssphp.blogspot.com/2009/07/rss-php-tutorial-1.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/1259404240973534651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/1259404240973534651'/><link rel='alternate' type='text/html' href='http://rssphp.blogspot.com/2009/07/rss-php-tutorial-1.html' title='RSS PHP: Tutorial #1'/><author><name>theme addict</name><uri>http://www.blogger.com/profile/00643766661601374606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8959671455961066636.post-5339062251214656038</id><published>2009-07-17T00:24:00.001+10:00</published><updated>2009-07-17T00:24:56.894+10:00</updated><title type='text'>Make Money with RSS</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8959671455961066636-5339062251214656038?l=rssphp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rssphp.blogspot.com/feeds/5339062251214656038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rssphp.blogspot.com/2009/07/make-money-with-rss.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/5339062251214656038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/5339062251214656038'/><link rel='alternate' type='text/html' href='http://rssphp.blogspot.com/2009/07/make-money-with-rss.html' title='Make Money with RSS'/><author><name>theme addict</name><uri>http://www.blogger.com/profile/00643766661601374606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8959671455961066636.post-8868825412205998713</id><published>2009-07-17T00:09:00.000+10:00</published><updated>2009-07-17T00:10:08.019+10:00</updated><title type='text'>RSS Parsing: The Future of RSS Aggregation</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8959671455961066636-8868825412205998713?l=rssphp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rssphp.blogspot.com/feeds/8868825412205998713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rssphp.blogspot.com/2009/07/rss-parsing-future-of-rss-aggregation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/8868825412205998713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/8868825412205998713'/><link rel='alternate' type='text/html' href='http://rssphp.blogspot.com/2009/07/rss-parsing-future-of-rss-aggregation.html' title='RSS Parsing: The Future of RSS Aggregation'/><author><name>theme addict</name><uri>http://www.blogger.com/profile/00643766661601374606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8959671455961066636.post-5747880664612976448</id><published>2009-07-16T23:52:00.001+10:00</published><updated>2009-07-16T23:52:38.998+10:00</updated><title type='text'>RSS Parsing: The Jackpot of the Web</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8959671455961066636-5747880664612976448?l=rssphp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rssphp.blogspot.com/feeds/5747880664612976448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rssphp.blogspot.com/2009/07/rss-parsing-jackpot-of-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/5747880664612976448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/5747880664612976448'/><link rel='alternate' type='text/html' href='http://rssphp.blogspot.com/2009/07/rss-parsing-jackpot-of-web.html' title='RSS Parsing: The Jackpot of the Web'/><author><name>theme addict</name><uri>http://www.blogger.com/profile/00643766661601374606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8959671455961066636.post-1670511945979254571</id><published>2009-07-16T15:58:00.000+10:00</published><updated>2009-07-16T16:35:06.461+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rss php'/><category scheme='http://www.blogger.com/atom/ns#' term='parsers'/><title type='text'>RSS PHP Parsers: Your own RSS Aggregator</title><content type='html'>&lt;span style="font-weight:bold;"&gt;RSS PHP Parsers&lt;/span&gt; basically allows you to use &lt;span style="font-weight:bold;"&gt;PHP &lt;/span&gt;and the power of &lt;span style="font-weight:bold;"&gt;RSS &lt;/span&gt;to create your own &lt;span style="font-weight:bold;"&gt;Aggregator&lt;/span&gt;. Meaning you can now have an automated website or blog with &lt;span style="font-weight:bold;"&gt;RSS &lt;/span&gt;feeding into it, essentially your own &lt;span style="font-weight:bold;"&gt;RSS Aggregator&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RSS Parsers &lt;/span&gt;make it simple to use the RSS feeds as they deal with RSS parsing issues.&lt;br /&gt;Here we have collected the best free &lt;span style="font-weight:bold;"&gt;RSS to PHP&lt;/span&gt; parsers available.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://magpierss.sourceforge.net/"&gt;MagpieRSS&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;Easy to use RSS PHP parser.&lt;br /&gt;RSS 1.0, 2.0, Atom.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://simplepie.org"&gt;SimplePie&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;SimplePie is a library of PHP code which parses RSS feeds.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://lastrss.oslab.net/"&gt;lastRSS&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;A powerful PHP class for parsing RSS feeds. &lt;br /&gt;All RSS versions supported.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://framework.zend.com/manual/en/zend.feed.html"&gt;Zend_Feed&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;Another easy to use RSS parser.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8959671455961066636-1670511945979254571?l=rssphp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rssphp.blogspot.com/feeds/1670511945979254571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rssphp.blogspot.com/2009/07/rss-php-parsers-your-own-rss-aggregator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/1670511945979254571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8959671455961066636/posts/default/1670511945979254571'/><link rel='alternate' type='text/html' href='http://rssphp.blogspot.com/2009/07/rss-php-parsers-your-own-rss-aggregator.html' title='RSS PHP Parsers: Your own RSS Aggregator'/><author><name>theme addict</name><uri>http://www.blogger.com/profile/00643766661601374606</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
