The following do work though: Would this be an acceptable alternative?
```
system "echo '<test/>' | \"#{prefix}/bin/xml2\""
```