XML render method surgery.

This stops us clobbering internal state when we recurse, and also
allows for bracketed expressions being parsed nicely.
We also shift to using '!' instead of '//' for comments, as '//'
parses as a Regex, which would complicate things somewhat.