Login   Register  
PHP Classes
elePHPant
Icontem

File: xml.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Marcelo Pereira  >  DB 2 XML  >  xml.php  >  Download  
File: xml.php
Role: Example script
Content type: text/plain
Description: XML class files
Class: DB 2 XML
Generate XML documents MySQL database table data
Author: By
Last change:
Date: 2005-07-28 06:59
Size: 582 bytes
 

Contents

Class file image Download
<?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>