add write xml function automately according by configure #2
Change-Id: If079a190c9d3a324bb543120015d15b9708a2d71