Moving addtagtoxml method to xmlutil class