/** * Parse XML file for language information. * * @param string $path Path to the xml files * @return array Array holding the found metadata as a key => value pair * @since 1.5 */ public static function _parseXMLLanguageFile($path) { // Try to load the file /*if (!$xml = JFactory::getXML($path)) { return null; }*/ // shumisha : JFactory::getXML() does not exist in J! 1.5 if (!($xml = shjlang16Helper::_getXML($path))) { return null; } // Check that it's a metadata file if ((string) $xml->getName() != 'metafile') { return null; } $metadata = array(); foreach ($xml->metadata->children() as $child) { $metadata[$child->getName()] = (string) $child; } return $metadata; }