public function import_files($xml) {
        $files = array();
        foreach ($xml as $file) {
            $data = new stdClass();
            $data->content = $file['#'];
            $data->encoding = $file['@']['encoding'];
            $data->name = $file['@']['name'];
            $files[] = $data;
        }
        return $files;
    }
public function import_files($xml) {
        $files = array();
        foreach ($xml as $file) {
            $data = new stdClass();
            $data->content = $file['#'];
            $data->encoding = $file['@']['encoding'];
            $data->name = $file['@']['name'];
            $files[] = $data;
        }
        return $files;
    }
public function import_files ( $ xml ) { $ files = array ( ) ; foreach ( $ xml as $ file ) { $ data = new stdClass ( ) ; $ data -> content = $ file [ '#' ] ; $ data -> encoding = $ file [ '@' ] [ 'encoding' ] ; $ data -> name = $ file [ '@' ] [ 'name' ] ; $ files [ ] = $ data ; } return $ files ; }
Import files from a node in the XML.
@param array $xml an array of <file> nodes from the the parsed XML.
@return array of things representing files - in the form that save_question expects.
Import files from a node in the XML .