protected static function parseXml($xmlFile, $name)
    {
        $options = [];
        if (file_exists($xmlFile)) {
            $xml = new \SimpleXMLElement($xmlFile, null, true);
            $xmlValues = [];
            foreach ($xml->set as $node) {
                $xmlValues[(string)$node->attributes()->name] = [];
                foreach ($node->opt as $opt) {
                    $xmlValues[(string)$node->attributes()->name][(string)$opt->attributes()->value] = (string)$opt;
                }
            }
            if (array_key_exists($name, $xmlValues)) {
                $options = $xmlValues[$name];
            }
        }
        return $options;
    }
protected static function parseXml($xmlFile, $name)
    {
        $options = [];
        if (file_exists($xmlFile)) {
            $xml = new \SimpleXMLElement($xmlFile, null, true);
            $xmlValues = [];
            foreach ($xml->set as $node) {
                $xmlValues[(string)$node->attributes()->name] = [];
                foreach ($node->opt as $opt) {
                    $xmlValues[(string)$node->attributes()->name][(string)$opt->attributes()->value] = (string)$opt;
                }
            }
            if (array_key_exists($name, $xmlValues)) {
                $options = $xmlValues[$name];
            }
        }
        return $options;
    }
protected static function parseXml ( $ xmlFile , $ name ) { $ options = [ ] ; if ( file_exists ( $ xmlFile ) ) { $ xml = new \ SimpleXMLElement ( $ xmlFile , null , true ) ; $ xmlValues = [ ] ; foreach ( $ xml -> set as $ node ) { $ xmlValues [ ( string ) $ node -> attributes ( ) -> name ] = [ ] ; foreach ( $ node -> opt as $ opt ) { $ xmlValues [ ( string ) $ node -> attributes ( ) -> name ] [ ( string ) $ opt -> attributes ( ) -> value ] = ( string ) $ opt ; } } if ( array_key_exists ( $ name , $ xmlValues ) ) { $ options = $ xmlValues [ $ name ] ; } } return $ options ; }
Static method to parse an XML file of options

@param  string $xmlFile
@param  string $name
@return array
Static method to parse an XML file of options