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: 12 years ago
Size: 660 bytes


Class file image Download
* This is a sample usage of the class
* this script is used to generate PHPVoice package
* create dtd/PHPVoice/ folder and copy you *.dtd files there
* then create output/ folder
* and finally run the script

$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->gen($PackageName, $module);