Check out that the "Apply Text Filter" checkbox is activated in the Settings > Menus & Sortcuts > Text list:

Check out that the shell script has execute permission.
Warning:
The proposed solution "as is" only works for very simple XML.
XML and JSON formats are not homeomorphic, many things can fail : entities, cdata, element repetitions, attributes, etc.
However, combined with 'jq' there seems to be more powerful customizations.
For a Text Factory to batch a folder refer to the BBEdit manual and the "Run Unix Filter" command.
HTH,
Jean Jourdain