PHPExiftool\RDFParser::getDom PHP Method

getDom() protected method

Compute the DOMDocument from the XML
protected getDom ( ) : DOMDocument
return DOMDocument
    protected function getDom()
    {
        if (!$this->XML) {
            throw new LogicException('You must open an XML first');
        }
        if (!$this->DOM) {
            $this->DOM = new \DOMDocument();
            /**
             * We shut up the warning to exclude an exception in case Warnings are
             * transformed in exception
             */
            if (!@$this->DOM->loadXML($this->XML)) {
                throw new ParseError('Unable to load XML');
            }
        }
        return $this->DOM;
    }