PHPackages                             soothsilver/dtd-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. soothsilver/dtd-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

soothsilver/dtd-parser
======================

Simple fully compliant DTD parser that allows you to extract information from Document Type Definition files.

0.1.0(11y ago)46.7k↑660%3MITPHPPHP &gt;=5.3

Since Oct 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Soothsilver/dtd-parser)[ Packagist](https://packagist.org/packages/soothsilver/dtd-parser)[ Docs](https://github.com/Soothsilver/dtd-parser)[ RSS](/packages/soothsilver-dtd-parser/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (2)Used By (0)

Soothsilver PHP DTD Parser
==========================

[](#soothsilver-php-dtd-parser)

This is a DTD parser contained a single PHP file that aims to be compliant to the full XML specification. The traditional method of reading XML files in PHP is to use the built-in functions based on libxml2. However, these do not allow you to read and parse Document Type Definition (DTD) files, they only tell you if the DTD is well-formed or not.

With this library, you can parse a DTD file and extract from it general and parameter entities, notations, element definitions and their attribute definitions and also processing instructions.

Examples
--------

[](#examples)

### Print all declared entities

[](#print-all-declared-entities)

```
