activesupport-2.3.2/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb
So if you need to pattern match the output of your xml generator, you can call to_xs to get the text that it is going to output.
A poor attempt to share the cool stuff that I'm working on right now.
activesupport-2.3.2/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb