Some code we were running that used libxo added single quote characters to a string that ended up in a value (via a few levels of indirection) and we were surprised to find that invalid XML was produced. It would be helpful if libxo did this for us or at a minimum least provided a simple vis(3) like function that did the escaping required for the current format mode.
In our case I ended up using a strsnvis() to blindly encode XML and JSON special characters.