integrate xml function