public function transform(PhingFile $xmlFile, Writer $out)
    {
        $this->sqlWriter = $out;

        // Reset some vars just in case this is being run multiple times.
        $this->currTableName = $this->currBuilder = null;

        $this->builderClazz = $this->generatorConfig->getBuilderClassname('datasql');

        try {
            $fr = new FileReader($xmlFile);
        } catch (Exception $e) {
            throw new BuildException("XML File not found: " . $xmlFile->getAbsolutePath());
        }

        $br = new BufferedReader($fr);

        $this->parser = new ExpatParser($br);
        $this->parser->parserSetOption(XML_OPTION_CASE_FOLDING, 0);
        $this->parser->setHandler($this);

        try {
            $this->parser->parse();
        } catch (Exception $e) {
            print $e->getMessage() . "\n";
            $br->close();
        }
        $br->close();
    }
public function transform(PhingFile $xmlFile, Writer $out)
    {
        $this->sqlWriter = $out;

        // Reset some vars just in case this is being run multiple times.
        $this->currTableName = $this->currBuilder = null;

        $this->builderClazz = $this->generatorConfig->getBuilderClassname('datasql');

        try {
            $fr = new FileReader($xmlFile);
        } catch (Exception $e) {
            throw new BuildException("XML File not found: " . $xmlFile->getAbsolutePath());
        }

        $br = new BufferedReader($fr);

        $this->parser = new ExpatParser($br);
        $this->parser->parserSetOption(XML_OPTION_CASE_FOLDING, 0);
        $this->parser->setHandler($this);

        try {
            $this->parser->parse();
        } catch (Exception $e) {
            print $e->getMessage() . "\n";
            $br->close();
        }
        $br->close();
    }
public function transform ( PhingFile $ xmlFile , Writer $ out ) { $ this -> sqlWriter = $ out ; // Reset some vars just in case this is being run multiple times. $ this -> currTableName = $ this -> currBuilder = null ; $ this -> builderClazz = $ this -> generatorConfig -> getBuilderClassname ( 'datasql' ) ; try { $ fr = new FileReader ( $ xmlFile ) ; } catch ( Exception $ e ) { throw new BuildException ( "XML File not found: " . $ xmlFile -> getAbsolutePath ( ) ) ; } $ br = new BufferedReader ( $ fr ) ; $ this -> parser = new ExpatParser ( $ br ) ; $ this -> parser -> parserSetOption ( XML_OPTION_CASE_FOLDING , 0 ) ; $ this -> parser -> setHandler ( $ this ) ; try { $ this -> parser -> parse ( ) ; } catch ( Exception $ e ) { print $ e -> getMessage ( ) . "\n" ; $ br -> close ( ) ; } $ br -> close ( ) ; }
Transform the data dump input file into SQL and writes it to the output stream.

@param PhingFile $xmlFile
@param Writer    $out

@throws BuildException
Transform the data dump input file into SQL and writes it to the output stream .