PHP Classes

File: phpvoice.class.php

Recommend this page to a friend!
  Classes of Ben Yacoub Hatem   DTD 2 PHP   phpvoice.class.php   Download  
File: phpvoice.class.php
Role: Example script
Content type: text/plain
Description: sample usage of the class
Class: DTD 2 PHP
Generate a class to output DTD compliant documents
Author: By
Last change:
Date: 20 years ago
Size: 660 bytes
 

Contents

Class file image Download
<?php
/**
* This is a sample usage of the class
* this script is used to generate PHPVoice package vxml.sf.net
* create dtd/PHPVoice/ folder and copy you *.dtd files there
* then create output/ folder
* and finally run the script
*/
require_once("dtd2php.class.php");

$PackageName = "PHPVoice";




$dir = dir("dtd/$PackageName");
while (
false !== ($entry = $dir->read())) {
    if (
$entry!="." and $entry!=".." and ereg(".dtd$",$entry)) {
       
$module = str_replace(".dtd","" ,$entry );
       
$d = new dtd2php;
       
$data = $d->open("dtd/$PackageName/$entry");
       
$d->parse($data);
       
$d->gen($PackageName, $module);
    }
}
$dir->close();


?>