Login   Register  
PHP Classes

File: cvt_adrbook.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of CPK Smithies  >  Palm Desktop  >  cvt_adrbook.php  >  Download  
File: cvt_adrbook.php
Role: Example script
Content type: text/plain
Description: Demonstrates conversion of address book file to XML
Class: Palm Desktop
Convert Palm Desktop files to other formats
Author: By
Last change:
Date: 2 years ago
Size: 767 bytes


Class file image Download
 * Convert palm address book files to XML files
 * @author CPKS
 * @version 0.1
 * @package palmdata

require 'adrbookfile.php';

 * XML dump name.dat to name.xml
 * @param string $filename
function cvt_adrbook($filename) {
$outfile pathinfo($filename);
$outfile $outfile['dirname'] . '/' $outfile['filename'] . '.xml';
$pf = new palmdata\addressbookFile($filename);
$x = new \XMLWriter;

$progname array_shift($argv);

while (
$fn array_shift($argv)) {
  try {
'converted 'basename($fn), PHP_EOL;
    catch (\
Exception $e) {
"Exception caught whilst processing $fn:\n";