"is a class library for creating, extending and manipulating XML documents. It is based on the DOM/XML library of PHP 4.x. ... phpDOM includes two packages: phpDOM for pure XML, and phpDOM.XHTML for well-formed XHTML documents. These two packages can be used as examples of how to extend the base classes."