This question is related to the solution nanny provides to the xml beautifying problem on this answer: How to prettify/format an XML buffer?
This works for me on Emacs 24.5 on Windows, but I want to know what does "xmllint --format -" parameter of the shell-command-on-region function mean? Apparently "xmllint --format" does not work and when I run "xmllint --format -" in the Windows shell it waits for my input instead of returning to the command interpreter. I am able to input an xml document data from the console and after pressing Ctrl-z RET get my input beautified back to the console.
I am curious what exactly the role of the trailing dash in the shell command execution string is.
shell-command-on-region
sends the text in the marked region to the specified command via standard input, and therefore the command needs to be told to read from stdin (if that is not already its default behaviour). The command's output on stdout will be read by Emacs and used appropriately. – phils Feb 15 '17 at 21:19