<?php
/************************************************************/
$rcsid='$Id: xml2csv.php,v 1.4 2009/05/08 20:19:28 engine Exp engine $ ';
$copyRight="Copyright (c) Ohad Aloni 2009. All rights reserved.";
$licenseId="Released under http://ohad.dyndns.org/license.txt (BSD)";
/************************************************************/
header("Content-Type: text/plain");
/******************************/
require_once("library.php");
/************************************************************/
if ( ! isset($_REQUEST['fname']) )
exit;
$fname = $_REQUEST['fname'];
if ( ! ($f = file_get_contents($fname)) ) {
echo "Can not Read $fname\n";
exit;
}
if ( ! ($csv = msdbXmlTable2csv($f) ) )
exit;
foreach ( $csv as $row )
echo "$row\n";
/************************************************************/
?>