 <p>From the documentation of <code>array_unique</code></p> <blockquote> <p>Note: Two elements are considered equal if and only if (string) $elem1 === (string) $elem2. In words: when the string representation is the same. The first element will be used.</p> </blockquote> <p>In this case, the objects you're getting out of the XPath query translate to string form like "SimpleXML object" (not exactly like that, but the exact representation is not important). According to the above rules, then, every element looks exactly the same to <code>array_unique</code>.</p> <p>Unfortunately, there's no way to make <code>array_unique</code> behave the way you want, so you will need to fake it yourself:</p> <pre><code>$feeds = array( 'myfeed.xml', 'myfeed.xml' ); // Get all feed entries $entries = array(); foreach ($feeds as $feed) { $xml = simplexml_load_file($feed); $tmp = $xml-&gt;xpath('/rss/channel//item'); foreach ($tmp as $item) { if(!in_array($tmp, $entries)) { $entries[] = $tmp; } } } </code></pre> <p>I'm not sure if this will work, as it depends on being able to compare objects, and also I don't know that identical nodes from separate XML documents would compare the same anyway. But try it, and let me know. I can whip something else up if this doesn't work.</p>