xml_attr_mod function

adds or updates attribute(s) in existing xml node