implement xml format output