Path)){ try{ $xml = new SimpleXMLElement(str_replace('xmlns=', 'ns=', file_get_contents($this->Path))); foreach($xml->xpath('//entry') ?: [] as $existingEntry){ foreach($this->Entries as $entry){ if($entry->Id == $existingEntry->id){ $entry->Updated = new DateTime($existingEntry->updated); } } } } catch(Exception $ex){ // XML parsing failure } } } protected function GetXmlString(): string{ if($this->XmlString === null){ $this->XmlString = $this->CleanXmlString(Template::OpdsNavigationFeed(['id' => $this->Id, 'url' => $this->Url, 'title' => $this->Title, 'parentUrl' => $this->Parent ? $this->Parent->Url : null, 'updated' => $this->Updated, 'subtitle' => $this->Subtitle, 'entries' => $this->Entries])); } return $this->XmlString; } }