<?php include '/var/www/appli/lib/srv.php'; require_once "/var/www/appli/class/class.gang.php"; $exaprint = new smartgang(); $linkToFile = null; $_GET['linkToFile'] = "/Volumes/mnt/raid1/datas/Production/Chef_de_fab_v2/MetrixExport/Listes/mxml/2016-10-01/ebx161001162251-135 DM.mxml"; if (isset($_GET['linkToFile']) && count($_GET['linkToFile']) > '0') { $linkToFile = $_GET['linkToFile']; $mxml = simplexml_load_file($linkToFile); // $exaprint->printr($mxml); // $exaprint->printr($mxml->ResourcePool->RGBColor['Blue']); foreach ($mxml->Project->LayoutPool->Layout as $key => $Layout) { $SheetsRequired = $Layout['SheetsRequired']; $PrintingMethod = $Layout['PrintingMethod']; //Stock sheet $StockSheetRef = $Layout->StockSheetRef['rRef']; foreach ($mxml->ResourcePool->Stock->StockSheet as $val => $donnee) { if (strval($StockSheetRef) == strval($donnee['ID'])) { $Height = $donnee['Height']; $Width = $donnee['Width']; } } //Component $ComponentRef = array(); $ComponentRef[] = $Layout->ComponentRefPool->ComponentRef['rRef']; $exaprint->printr($ComponentRef); } }