This command provides an easy way to modify node's data (content) using arbitrary Perl code.
Each of the nodes matching xpath is passes its data to the perl-code via the $_ variable and receives the (possibly) modified data using the same variable.
Since element nodes do not really have any proper content (they are only a storage for other nodes), node's name (tag) is used in case of elements. Note, however, that recent versions of XSH provide a special command rename with a very similar syntax to map, that should be used for renaming element, attribute, and processing instruction nodes.