src/CarteBlanche/App/ConfigFiletype/XmlFiletype.php
function parse(\SplFileInfo $file)
    {
        $content = file_get_contents($file->getRealpath());
        libxml_clear_errors();
        $xml_config = Xml2Array::convert($content);
        $config = $this->rebuild($xml_config);

/*
        libxml_clear_errors();
        libxml_use_internal_errors(true);
        try {
            $xml = new \SimpleXMLElement($content);
        } catch (\Exception $e) {
            $errors = libxml_get_errors();
            if (!empty($errors)) {
                $last_error = libxml_get_last_error();
                throw new \RuntimeException(
                    sprintf('XML parsing errors with message "%s"!', $last_error->message)
                );
            }
        }
var_export($xml);        
        $config = array();

        libxml_clear_errors();
*/

        return $config;
    }
function parse(\SplFileInfo $file)
    {
        $content = file_get_contents($file->getRealpath());
        libxml_clear_errors();
        $xml_config = Xml2Array::convert($content);
        $config = $this->rebuild($xml_config);

/*
        libxml_clear_errors();
        libxml_use_internal_errors(true);
        try {
            $xml = new \SimpleXMLElement($content);
        } catch (\Exception $e) {
            $errors = libxml_get_errors();
            if (!empty($errors)) {
                $last_error = libxml_get_last_error();
                throw new \RuntimeException(
                    sprintf('XML parsing errors with message "%s"!', $last_error->message)
                );
            }
        }
var_export($xml);        
        $config = array();

        libxml_clear_errors();
*/

        return $config;
    }
Parse a file content

@param   \SplFileInfo    $file   The file to parse
@return array