rewrote html to xml to output better xml format