protected function parseMetadata( \SimpleXMLElement $xml ) {

		foreach ( $xml->metadata->children( 'dc', true ) as $key => $val ) {

			$val = (string) $val;

			// Set authors
			if ( 'creator' === $key && ! empty( $val ) ) {
				$this->authors .= trim( $val ) . ', ';
			} elseif ( 'contributor' === $key && ! empty( $val ) ) {
				$this->authors .= trim( $val ) . ', ';
			}
		}

		// Get rid of trailing comma
		$this->authors = rtrim( $this->authors, ', ' );
	}
protected function parseMetadata( \SimpleXMLElement $xml ) {

		foreach ( $xml->metadata->children( 'dc', true ) as $key => $val ) {

			$val = (string) $val;

			// Set authors
			if ( 'creator' === $key && ! empty( $val ) ) {
				$this->authors .= trim( $val ) . ', ';
			} elseif ( 'contributor' === $key && ! empty( $val ) ) {
				$this->authors .= trim( $val ) . ', ';
			}
		}

		// Get rid of trailing comma
		$this->authors = rtrim( $this->authors, ', ' );
	}
protected function parseMetadata ( \ SimpleXMLElement $ xml ) { foreach ( $ xml -> metadata -> children ( 'dc' , true ) as $ key => $ val ) { $ val = ( string ) $ val ; // Set authors if ( 'creator' === $ key && ! empty ( $ val ) ) { $ this -> authors .= trim ( $ val ) . ', ' ; } elseif ( 'contributor' === $ key && ! empty ( $ val ) ) { $ this -> authors .= trim ( $ val ) . ', ' ; } } // Get rid of trailing comma $ this -> authors = rtrim ( $ this -> authors , ', ' ) ; }
Parse OPF metadata nodes

@param \SimpleXMLElement $xml
Parse OPF metadata nodes