コード例 #1
0
 /**
  * Validate the object.
  * @return boolean
  */
 public function isValid()
 {
     libxml_use_internal_errors(true);
     $feed = new \DOMDocument();
     $result = $feed->load($this->xmlFile->getFilename());
     if ($result === false) {
         return false;
     }
     return (bool) @$feed->schemaValidate($this->xsdFile->getFilename());
 }
コード例 #2
0
ファイル: Parser.php プロジェクト: soneritics/realworks
 /**
  * Parse the XML file by invoking an XML reader.
  * Each XML object must be processed per line by the ParseObject method.
  * @return array
  */
 protected function parseXML()
 {
     $xml = simplexml_load_file($this->xmlFile->getFilename());
     return $this->parseData($xml);
 }