Convenience routine to output an element id with integer value val.
id
val
XMLOut
Element name
Element value