Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Amit Yadav  >  CSV2XML  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example file
Class: CSV2XML
Generate XML documents from data of CSV files
Author: By
Last change: Including the class file
Date: 3 years ago
Size: 533 bytes
 

Contents

Class file image Download
<?php
/*-----------
This PHP file illustrates how to use the CSV2XML class to convert the CSV file to an XML.
-------------*/
include("Class_XLS2Xml.php");

//Create the instance of the class
$csv2xml = new csv2xml(); 

//Set the root node for the XML
$csv2xml->setRootNode("ROOT"); 

// Set the recurring node for the XML
$csv2xml->setRecurringNode("Presidents"); 

//Provide the CSV filemname
$csv2xml->setCSVFile("USPresident Wikipedia URLs Thmbs HS.csv"); 

//Convert the file
$csv2xml->convertCSV2XML(); 
?>