At some point I'll probably write a decent web page...

For now, here's the idea:

$ gem install genx4r
Attempting local installation of 'genx4r'
Local gem file not found: genx4r*.gem
Attempting remote installation of 'genx4r'
Updating Gem source index for:
Building native extensions.  This could take a while...
ruby extconf.rb install genx4r
creating Makefile

gcc -fno-common -g -O2 -pipe -fno-common  -I. -I/usr/local/lib/ruby/1.8/powerpc
-darwin -I/usr/local/ruby/lib/ruby/1.8/powerpc-darwin -I.   -c charProps.c
gcc -fno-common -g -O2 -pipe -fno-common  -I. -I/usr/local/ruby/lib/ruby/1.8/po
werpc-darwin -I/usr/local/ruby/lib/ruby/1.8/powerpc-darwin -I.   -c genx.c
gcc -fno-common -g -O2 -pipe -fno-common  -I. -I/usr/local/ruby/lib/ruby/1.8/po
werpc-darwin -I/usr/local/ruby/lib/ruby/1.8/powerpc-darwin -I.   -c genx4r.c
cc -dynamic -bundle -undefined suppress -flat_namespace  -L'/usr/local/lib' -o
genx4r.bundle charProps.o genx.o genx4r.o  -ldl -lobjc  

make install
install -c -p -m 0755 genx4r.bundle /usr/local/lib/ruby/gems/1.8/gems/genx4r-0.
Successfully installed genx4r, version 0.04
Installing RDoc documentation for genx4r-0.04...
WARNING: Generating RDoc on .gem that may not have RDoc.
$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require_gem 'genx4r'
=> true
irb(main):003:0> w =
=> #<GenX::Writer:0x50b1a8>
irb(main):004:0> s = ''    
=> ""
irb(main):005:0> w.document(s) do
irb(main):006:1*   w.element("foo") do
irb(main):007:2*     w.text("bar")
irb(main):008:2>   end
irb(main):009:1> end
=> nil
irb(main):010:0> s
=> "<foo>bar</foo>"
irb(main):011:0> quit

If you prefer tarballs to gems, grab it here.