private static function parseXml(\Gettext\Translations $translations, $realPath, $shownPath)
    {
        if (@filesize($realPath) !== 0) {
            $xml = new \DOMDocument();
            if ($xml->load($realPath) === false) {
                global $php_errormsg;
                if (isset($php_errormsg) && $php_errormsg) {
                    throw new \Exception("Error loading '$realPath': $php_errormsg");
                } else {
                    throw new \Exception("Error loading '$realPath'");
                }
            }
            switch ($xml->documentElement->tagName) {
                case 'concrete5-cif':
                case 'styles':
                    static::parseXmlNode($translations, $shownPath, $xml->documentElement, '');
                    break;
            }
        }
    }
private static function parseXml(\Gettext\Translations $translations, $realPath, $shownPath)
    {
        if (@filesize($realPath) !== 0) {
            $xml = new \DOMDocument();
            if ($xml->load($realPath) === false) {
                global $php_errormsg;
                if (isset($php_errormsg) && $php_errormsg) {
                    throw new \Exception("Error loading '$realPath': $php_errormsg");
                } else {
                    throw new \Exception("Error loading '$realPath'");
                }
            }
            switch ($xml->documentElement->tagName) {
                case 'concrete5-cif':
                case 'styles':
                    static::parseXmlNode($translations, $shownPath, $xml->documentElement, '');
                    break;
            }
        }
    }
private static function parseXml ( \ Gettext \ Translations $ translations , $ realPath , $ shownPath ) { if ( @ filesize ( $ realPath ) !== 0 ) { $ xml = new \ DOMDocument ( ) ; if ( $ xml -> load ( $ realPath ) === false ) { global $ php_errormsg ; if ( isset ( $ php_errormsg ) && $ php_errormsg ) { throw new \ Exception ( "Error loading '$realPath': $php_errormsg" ) ; } else { throw new \ Exception ( "Error loading '$realPath'" ) ; } } switch ( $ xml -> documentElement -> tagName ) { case 'concrete5-cif' : case 'styles' : static :: parseXmlNode ( $ translations , $ shownPath , $ xml -> documentElement , '' ) ; break ; } } }
Parses an XML CIF file and extracts translatable strings.

@param \Gettext\Translations $translations
@param string                $realPath
@param string                $shownPath

@throws \Exception
Parses an XML CIF file and extracts translatable strings .