def _KindPropertiesToXml(self):
    properties = self._kind_properties.intersection(set(self.keys()))

    xml = u''
    for prop in sorted(properties):
      prop_xml = saxutils.quoteattr(prop)[1:-1]

      value = self[prop]
      has_toxml = (hasattr(value, 'ToXml') or
                   isinstance(value, list) and hasattr(value[0], 'ToXml'))

      for val in self._XmlEscapeValues(prop):


        if has_toxml:
          xml += '\n  %s' % val
        else:
          xml += '\n  <%s>%s</%s>' % (prop_xml, val, prop_xml)

    return xml
Returns a copy of the object.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/datastore_entities.py/GdKind._KindPropertiesToXml--crossover with--dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/regression/mixed_linear_model.py/MixedLMParams.copy