class Builder::XmlBase

def cache_method_call(sym)

significantly.
method_missing is very slow, this speeds up document generation
be handled by the new method instead of method_missing. As
documents are usually very repetative in nature, the next node will
missed as an instance method on the XMLBase object. Because XML
If XmlBase.cache_method_calls = true, we dynamicly create the method
def cache_method_call(sym)
  instance_eval <<-NEW_METHOD
    def #{sym.to_s}(*args, &block)
      tag!(:#{sym.to_s}, *args, &block)
    end
  NEW_METHOD
end