Library to format HTML with PHP

Does anyone know of a good library that can format/beautify html? I’ve already looked at DOMDocument and PHP Tidy, neither works for my purposes.

If you could explain what your purposes are would be a good hint.

Check out the XML manipulation of the php manual. There’s gotta be something there that can help you.

http://www.php.net/manual/en/refs.xml.php