xml_info: simplify svg gradient code