This command just runs `xmlstarlet path > path`, doing a simple pretty-printing of the file located at `path`.
pretty_print(path)
path | Path to your file you want pretty-printed. (character) |
---|
Returns the result of the `system` command (0 = success)
Note that this function is doing an in-place pretty printing instead of returning the pretty-printed text.
Note that this command uses a temporary file as an intermediate step in the pretty-printing process. For some reason, when running xmlstarlet from within R, the same file can't be used as the input to `xmlstarlet format` and as the shell redirection file (`> somefile.txt`). If you try to run `xmlstarlet format` on the same file as you redirect to, you get a weird parse error from xmlstarlet.