htree provides a tree data structure which represent HTML and XML data.

 * Permissive unified HTML/XML parser
 * byte-to-byte round-tripping unparser
 * XML namespace support
 * Dedicated class for escaped string. This ease sanitization.
 * HTML/XHTML/XML generator
 * template engine
 * recursive template expansion
 * converter to REXML document

Homepage:
http://www.a-k-r.org/htree/
