Login   Register  
PHP Classes
elePHPant
Icontem

File: phpvoice.class.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2004-06-17 09:07
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();


?>