public function isValidXML($xml)
    {
        $doc = new \DOMDocument();
        try {
            return $doc->loadXML($xml) === true;
        } catch(\Exception $e) {
            $this->logger->warning('XMLDocument::isValidXML() - ' . $e->getMessage());
            return false;
        }
    }
public function isValidXML($xml)
    {
        $doc = new \DOMDocument();
        try {
            return $doc->loadXML($xml) === true;
        } catch(\Exception $e) {
            $this->logger->warning('XMLDocument::isValidXML() - ' . $e->getMessage());
            return false;
        }
    }
public function isValidXML ( $ xml ) { $ doc = new \ DOMDocument ( ) ; try { return $ doc -> loadXML ( $ xml ) === true ; } catch ( \ Exception $ e ) { $ this -> logger -> warning ( 'XMLDocument::isValidXML() - ' . $ e -> getMessage ( ) ) ; return false ; } }
Check if XML content is valid.

@return boolean true or false.
Check if XML content is valid .