PEAR Manual
Prev |  | Next

# XML_Beautifier::formatFile()

XML_Beautifier::formatFile() -- beautify a file

## Synopsis

    require_once 'XML/Beautifier.php';

``object XML_Beautifier::formatFile` (string $file [, string $newFile = `NULL` [, string $renderer = "Plain"]])`

## Description

Beautifies a file.

## Parameter

- `string $file` - filename of the original file

- `string $newFile` - filename for the beautified file. If no file is given, the method will return the resulting XML document. To overwrite the original file, pass `XML_BEAUTIFIER_OVERWRITE`.

- `string $renderer` - renderer to use, currently only a "Plain" XML renderer can be used.

## Return value

mixed Either true, if file has been written or the XML document string.

## Note

This function can not be called statically.

Prev | Home | Next
XML_Beautifier::apiVersion() | Up | XML_Beautifier::formatString()