public function loadItemFromFile($file)
    {
        $returnValue = null;

        if (is_string($file) && !empty($file)) {

            //validate the file to import
            try {
                $qtiParser = new Parser($file);
                $qtiParser->validate();

                if (!$qtiParser->isValid()) {
                    throw new ParsingException($qtiParser->displayErrors());
                }

                $returnValue = $qtiParser->load();
            } catch(ParsingException $pe) {
                throw new ParsingException($pe->getMessage());
            } catch(Exception $e) {
                throw new Exception("Unable to load file {$file} caused  by {$e->getMessage()}");
            }
        }

        return $returnValue;
    }