export to xml base code