Location: PHPKode > scripts > DB 2 XML > db-2-xml/xml.php
<?php

include_once('db2xml.class.php');

$xml = new db2XML();

$xml->setTable('tb_comida');
$xml->setFile('xemele_rango.xml');
$xml->setXML_MainTag('RESTAURANT');

$campos_db = array('tx_name', 'tx_type', 'tx_locale', 'vl_ranking');
$xml->setFields_DB($campos_db);

$estrutura = array("" => "FOOD", 
                   "tx_name" => "FOOD_NAME",
                   "tx_type" => "TYPe",
                   "tx_locale" => "LOCALE",
                   "vl_ranking" => "RANKING");

$xml->setXML_Structure($estrutura);
$xml->write2file();

?>

<a href="xemele_rango.xml">See XML File</a>
Return current item: DB 2 XML