classes/phing/tasks/ext/visualizer/VisualizerTask.php
protected function loadXmlFile(string $xmlFile): SimpleXMLElement
    {
        $xmlContent = (new FileReader($xmlFile))->read();
        $xml = simplexml_load_string($xmlContent);

        if (!($xml instanceof SimpleXMLElement)) {
            $message = "Error loading XML file: $xmlFile";
            $this->log($message, Project::MSG_ERR);
            throw new BuildException($message);
        }

        return $xml;
    }
protected function loadXmlFile(string $xmlFile): SimpleXMLElement
    {
        $xmlContent = (new FileReader($xmlFile))->read();
        $xml = simplexml_load_string($xmlContent);

        if (!($xml instanceof SimpleXMLElement)) {
            $message = "Error loading XML file: $xmlFile";
            $this->log($message, Project::MSG_ERR);
            throw new BuildException($message);
        }

        return $xml;
    }
protected function loadXmlFile ( string $ xmlFile ) : SimpleXMLElement { $ xmlContent = ( new FileReader ( $ xmlFile ) ) -> read ( ) ; $ xml = simplexml_load_string ( $ xmlContent ) ; if ( ! ( $ xml instanceof SimpleXMLElement ) ) { $ message = "Error loading XML file: $xmlFile" ; $ this -> log ( $ message , Project :: MSG_ERR ) ; throw new BuildException ( $ message ) ; } return $ xml ; }
Load XML content from a file

@param string $xmlFile XML or XSLT file

@return \SimpleXMLElement
Load XML content from a file