sign xml function