i have issue with code for xml
it's load link url ok and insert all category to db
after this scan the text on xml
some of category broken and have problem
i want the code skip if have error and continue to next
i put the line talk about and error show
$xml_str = file_get_contents($xmls);
$xml = new SimpleXMLElement($xml_str); - (THIS LINE show with error)
if($xml)
{
$arrayDef = array();
foreach ($xml->products->product as $item) {
$arrayTemp = array();
$arrayTemp['product_url'] = (string)$item->PRODUCT_URL;
$arrayTemp['product_name'] = (string)$item->product_name;
$arrayTemp['model'] = (string)$item->MODEL;
$arrayTemp['cat_number'] = (string)$item->CATALOG_NUMBER;
$arrayTemp['details'] = (string)$item->DETAILS;
$arrayTemp['currency'] = (string)$item->CURRENCY;
$arrayTemp['price'] = (string)$item->PRICE;
$arrayTemp['shipcost'] = (string)$item->SHIPMENT_COST;
$arrayTemp['delivery'] = (string)$item->DELIVERY_TIME;
$arrayTemp['manufacturer'] = (string)$item->MANUFACTURER;
$arrayTemp['image'] = (string)$item->IMAGE;
$arrayTemp['tax'] = (string)$item->TAX;
array_push($arrayDef, $arrayTemp);
$this->model_bsell_xmlcompare->addProductxml($arrayTemp,$store_id);
}
// echo '<pre>' . print_r($arrayDef, true) . '</pre>';
//controll check
$this->model_bsell_xmlcompare->getcategoryupdate($xmls);
$x++;
}
}
please only if u know xml very good!!!!
budget max 20$ for all skipe error on this