'Generate an XML representation of this model instance.
atom and gd:namespace properties are converted to XML according to their
respective schemas. For more information, see:
http://www.atomenabled.org/developers/syndication/
http://code.google.com/apis/gdata/common-elements.html'

def to_xml(self, _entity_class=datastore.Entity):

    entity = self._populate_entity(_entity_class)
    return entity.ToXml()
