Location: PHPKode > scripts > DTD 2 PHP > dtd-2-php/phpvoice.class.php
<?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();


?>
Return current item: DTD 2 PHP