public function saveXmlFile($path = '')
    {
        $this->formatOutput = true;

        if ($path) {
            $bool = @$this->save($path);
            if (!$bool) {
                $this->error = 'save_file_error';
                return false;
            }

            return true;
        }

        return $this->saveXML();
    }
public function saveXmlFile($path = '')
    {
        $this->formatOutput = true;

        if ($path) {
            $bool = @$this->save($path);
            if (!$bool) {
                $this->error = 'save_file_error';
                return false;
            }

            return true;
        }

        return $this->saveXML();
    }
public function saveXmlFile ( $ path = '' ) { $ this -> formatOutput = true ; if ( $ path ) { $ bool = @ $ this -> save ( $ path ) ; if ( ! $ bool ) { $ this -> error = 'save_file_error' ; return false ; } return true ; } return $ this -> saveXML ( ) ; }
save xml file, optionally will return as string

@param string $path xml file path
@return string|boolean

@example saveXmlFile('path/filename.xml'); save to file
@example saveXmlFile() will return as simple text
save xml file optionally will return as string