cleaned up the xml output a bit, removed some whitespace and escaped more potentially-idiotic strings