work on #79, improve html/xml formatting