PEAR Manual
Prev |  | Next

# XML_Util::getXMLDeclaration()

XML_Util::getXMLDeclaration() -- build an xml declaration

## Synopsis

    require_once 'XML/Util.php';

``string XML_Util::getXMLDeclaration` ([string $version = "1.0" [, string $encoding = `NULL` [, boolean $standalone = `NULL`]]])`

## Description

Returns an XML declaration based on parameters.

## Parameter

- `string $version` - XML version

- `string $encoding` - XML encoding

- `boolean $standalone` - whether document is standalone

## Return value

string XML declaration

## Note

This function should be called statically.

Prev | Home | Next
XML_Util::getDocTypeDeclaration() | Up | XML_Util::isValidName()