note 68173 added to function.xml-parse-into-struct
| From: | webmaster at unitedscripters dot com | Date: | Mon, 17 Jul 2006 00:29:50 +0000 |
| Subject: | note 68173 added to function.xml-parse-into-struct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-114835@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 66.163.161.117
Probable Submitter: 82.84.31.31
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.xml-parse-into-struct.php
Edit -- http://master.php.net/note/edit/68173
Del: integrated -- http://master.php.net/note/delete/68173/integrated
Del: useless -- http://master.php.net/note/delete/68173/useless
Del: bad code -- http://master.php.net/note/delete/68173/bad+code
Del: spam -- http://master.php.net/note/delete/68173/spam
Del: non-english -- http://master.php.net/note/delete/68173/non-english
Del: in docs -- http://master.php.net/note/delete/68173/in+docs
Del: other reasons-- http://master.php.net/note/delete/68173
Reject -- http://master.php.net/note/reject/68173
Search -- http://master.php.net/manage/user-notes.php