public static function loadFromXML($xmlDaos)
 {
     $daos = array();
     $doc = new DOMDocument('1.0', 'utf-8');
     $doc->loadXML($xmlDaos);
     $nodes = $doc->getElementsByTagName("MonitorSalon");
     foreach ($nodes as $node) {
         $dao = new MonitorSalonDTO();
         $data = $node->getElementsByTagName("MonitorSalon_Id");
         if ($data->length > 0) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setId($data);
         $data = $node->getElementsByTagName("monitorSalonEntrada");
         if ($data->length > 0 && !MonitorSalonDTO::isEmpty($data->item(0)->nodeValue)) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setMonitorSalonEntrada($data);
         $data = $node->getElementsByTagName("monitorSalonSalida");
         if ($data->length > 0 && !MonitorSalonDTO::isEmpty($data->item(0)->nodeValue)) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setMonitorSalonSalida($data);
         $data = $node->getElementsByTagName("monitorSalonComentarios");
         if ($data->length > 0 && !MonitorSalonDTO::isEmpty($data->item(0)->nodeValue)) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setMonitorSalonComentarios($data);
         $data = $node->getElementsByTagName("monitor");
         if ($data->length > 0 && !empty($data->item(0)->nodeValue)) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setMonitor($data);
         $data = $node->getElementsByTagName("salon");
         if ($data->length > 0 && !empty($data->item(0)->nodeValue)) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setSalon($data);
         $daos[] = $dao;
     }
     return $daos;
 }
 public function toDTO()
 {
     $monitorSalonDTO = new MonitorSalonDTO();
     $monitorSalonDTO->setId($this->getId());
     $monitorSalonDTO->setMonitorSalonEntrada($this->unscapeString($this->getMonitorSalonEntrada()));
     $monitorSalonDTO->setMonitorSalonSalida($this->unscapeString($this->getMonitorSalonSalida()));
     $monitorSalonDTO->setMonitorSalonComentarios($this->unscapeString($this->getMonitorSalonComentarios()));
     $monitorSalonDTO->setMonitor($this->unscapeString($this->getMonitor()));
     $monitorSalonDTO->setSalon($this->unscapeString($this->getSalon()));
     return $monitorSalonDTO;
 }