xml_func.py: _map: Factored replacing code out into new function repl(), which can also be used by other XML funcs
xml_func.py: _map: Factored replacing code out into new function repl(), which can also be used by other XML funcs