note 68173 deleted from function.xml-parse-into-struct by cmb
| From: | cmb@php.net | Date: | Sun, 06 Oct 2019 08:28:26 +0000 |
| Subject: | note 68173 deleted from function.xml-parse-into-struct by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212527@lists.php.net to get a copy of this message | ||
Note Submitter: webmaster at unitedscripters dot com
----
Ps keep in mind that some Rss feeds include spurious tags as... html entities (see Google news Rss
feeds: they include tables as <table blah blah!).
If so, in my rssSnapper below add this:
<?php
$input=preg_replace("/(<!\\[CDATA\\[)|(\\]\\]>)/", '', $input);
$input=html_entity_decode($input); //<-- added line
?>
You may play around with the code and make it perfect, testing it on various feeds. Not _all_ XML is
worth of an XML parser and the sleepless nights it entails.