'Intercept attribute access to generalize "with_{xmlattr_name}()"
methods.'

def __getattr__(self, name):

    if (name in self._xmlattr_method_map):
        def with_xmlattr(value):
            xmlattr_name = self._xmlattr_method_map[name]
            self._set_xmlattr(xmlattr_name, value)
            return self
        return with_xmlattr
    else:
        tmpl = u"'%s'    object    has    no    attribute    '%s'"
        raise AttributeError((tmpl % (self.__class__.__name__, name)))
