'Called as each object is handled.'

def start_object(self, obj):

    if (not hasattr(obj, '_meta')):
        raise base.SerializationError(('Non-model    object    (%s)    encountered    during    serialization' % type(obj)))
    self.indent(1)
    obj_pk = obj._get_pk_val()
    if (obj_pk is None):
        attrs = {'model': smart_unicode(obj._meta)}
    else:
        attrs = {'pk': smart_unicode(obj._get_pk_val()), 'model': smart_unicode(obj._meta)}
    self.xml.startElement('object', attrs)
