Improved XHTML->format