<?php
require("resultset2xml_class.php");
// get here your recordset
$concertRecordset = mysql_query($query,$dbi);
// create the instance of the class
$resultset2xml = new Resultset2xml("concerts", "category", $concertRecordset, false);
// select the field you want: data and text are two fields of recordset (see documentation for details)
$resultset2xml->add_field("data", $resultset2xml->FIELD_DATE);
$resultset2xml->add_field("text", $resultset2xml->FIELD_TEXT, "phrase");
// print the xml on the page
echo $resultset2xml->getXml();
?>
|