Retrieving Data From NOT Correct RSS

71 views Asked by At

I receive an XML file with structure like this:

<items>
<item>
<id>...</id>
<title>...</title>
<image>...</image>
</item>
</items>

I normally use MagpieRss, but this feed is not a proper RSS, so $rss->items gives me an array of 10 (real number of items) empty elements.
How can I fetch the data, preferably with Magpie?
I use simpleXML now, but it is not the best option due to different formats of its output and Magpie's one. I had to rewrite all the following code to suit to both formats.

1

There are 1 answers

1
whichdan On

Have you tried using Tidy to fix the XML before feeding it into Magpie?