MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / to_xml_string

Method to_xml_string

dm_control/mjcf/attribute.py:280–288  ·  view source on GitHub ↗
(self, prefix_root=None, **kwargs)

Source from the content-addressed store, hash-verified

278 return constants.PREFIX_SEPARATOR.join(prefix) or constants.PREFIX_SEPARATOR
279
280 def to_xml_string(self, prefix_root=None, **kwargs):
281 if self._parent.tag == constants.DEFAULT:
282 return self._defaults_string(prefix_root)
283 elif self._value:
284 prefix = self._parent.namescope.full_prefix(prefix_root, as_list=True)
285 prefix.append(self._value)
286 return constants.PREFIX_SEPARATOR.join(prefix)
287 else:
288 return self._value
289
290
291class Reference(_Attribute):

Callers

nothing calls this directly

Calls 2

_defaults_stringMethod · 0.95
full_prefixMethod · 0.80

Tested by

no test coverage detected