too long

I have a file with products: http://com6.com/items.xml
I want to remove all products priced at less than 200 I have the following code:

<?php



$xml = simplexml_load_file('http://com6.com/items.xml ');
$toDelete = array();
foreach ($xml->PRICE as $PRICE) {
$cena  = $PRICE->RETAIL_PRICE;
if ($cena < 200 ) {$toDelete[] = $PRICE; } 
}



foreach ($toDelete as $PRICE) {
    $dom = dom_import_simplexml($PRICE);
    $dom->parentNode->removeChild($dom);
}


$xml->asXML("result.xml");


?>

This code works with other XML files but with this: http://com6.com/items.xml did not work.

There are times when XML isn't loaded properly and I face this issue all the time. In such cases what you could do is convert the XML to an associative Array and delete that key from the array.

<?php
$xmlObject = simplexml_load_string($xml_URL);
$json = json_encode($xmlObject);
$array = json_decode($json, TRUE);

foreach($array as $element) {
    if($element['RETAIL_PRICE'] < 200) {
        unset($element);
    }
}