PEAR Manual
Prev |  | Next

# XML_sql2xml::getXML

XML_sql2xml::getXML -- Returns a XML representation of the result set.

## Synopsis

    require_once "XML/sql2xml.php";

``string XML_sql2xml::getXML` ([mixed $result = `NULL`])`

## Description

Returns an XML string with a XML representation of the result set. The result set can be directly provided here, or if you need more than one in your XML, then you have to provide each of them with add() before you call getXML(), but the last one can also be provided here.

## Parameter

- `mixed $result` - a DB_result object from a DB query or a SQL query

## Return value

`string` - the XML string

## Note

This function can not be called statically.

Prev | Home | Next
XML_sql2xml::addArray | Up | XML_sql2xml::getXMLObject