(self, prefix_root=None, debug_context=None)
return xml_element
Generates an etree._Element corresponding to this MJCF element.

    Args:
      prefix_root: (optional) A `NameScope` object to be treated as root
        for the purpose of calculating the prefix.
        If `None` then no prefix is included.
      debug_context: (optional) A `debugging.DebugContext` object to which
        the debugging information associated with the generated XML is written.
        This is intended for internal use within PyMJCF; users should never need
        manually pass this argument.

    Returns:
      An etree._Element object.
Generates an etree._Element corresponding to this MJCF element.
Generates an etree . _Element corresponding to this MJCF element .
def to_xml(self, prefix_root=None, debug_context=None):
    """Generates an etree._Element corresponding to this MJCF element.

    Args:
      prefix_root: (optional) A `NameScope` object to be treated as root
        for the purpose of calculating the prefix.
        If `None` then no prefix is included.
      debug_context: (optional) A `debugging.DebugContext` object to which
        the debugging information associated with the generated XML is written.
        This is intended for internal use within PyMJCF; users should never need
        manually pass this argument.

    Returns:
      An etree._Element object.
    """
    prefix_root = prefix_root or self.namescope
    xml_element = etree.Element(self._spec.name)
    self._attributes_to_xml(xml_element, prefix_root, debug_context)
    self._children_to_xml(xml_element, prefix_root, debug_context)
    return xml_element
def to_xml ( self , prefix_root = None , debug_context = None ) : prefix_root = prefix_root or self . namescope xml_element = etree . Element ( self . _spec . name ) self . _attributes_to_xml ( xml_element , prefix_root , debug_context ) self . _children_to_xml ( xml_element , prefix_root , debug_context ) return xml_element