PHP code example of soothsilver / dtd-parser

1. Go to this page and download the library: Download soothsilver/dtd-parser library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

soothsilver / dtd-parser example snippets



$dtd = \Soothsilver\DtdParser\DTD::parseText(file_get_contents("mydtd.dtd"));
foreach($dtd->generalEntities as $entity)
{
 echo $entity->Name . ": " . $entity->replacementText . "\n";
}
foreach($dtd->parameterEntities as $entity)
{
 echo $entity->Name . ": " . $entity->replacementText . "\n";
}