Ejemplo n.º 1
0
 /**
  * Parse the XML into objects
  *
  * @param \DOMDocument $document
  */
 protected function parse(\DOMDocument $document)
 {
     $xpath = new \DOMXPath($document);
     $xpath->registerNamespace("marc", $this->namespace);
     $records = $xpath->query("//marc:record");
     $this->_length = $records->length;
     foreach ($records as $record) {
         $marc_record = new Record();
         $marc_record->loadXML($record);
         array_push($this->_records, $marc_record);
     }
 }