| 1159 | return [child for child in self._children] |
| 1160 | |
| 1161 | def to_xml(self, prefix_root=None, debug_context=None, |
| 1162 | *, |
| 1163 | precision=constants.XML_DEFAULT_PRECISION, |
| 1164 | zero_threshold=0, |
| 1165 | filename_with_hash=True): |
| 1166 | prefix_root = prefix_root or self.namescope |
| 1167 | xml_element = (super().to_xml(prefix_root, debug_context, |
| 1168 | precision=precision, |
| 1169 | zero_threshold=zero_threshold, |
| 1170 | filename_with_hash=filename_with_hash)) |
| 1171 | if isinstance(self._parent, RootElement): |
| 1172 | root_default = etree.Element(self._spec.name) |
| 1173 | root_default.append(xml_element) |
| 1174 | for attachment in self._attachments.values(): |
| 1175 | attachment_xml = attachment.to_xml( |
| 1176 | prefix_root, debug_context, |
| 1177 | precision=precision, |
| 1178 | zero_threshold=zero_threshold, |
| 1179 | filename_with_hash=filename_with_hash) |
| 1180 | for attachment_child_xml in attachment_xml: |
| 1181 | root_default.append(attachment_child_xml) |
| 1182 | xml_element = root_default |
| 1183 | return xml_element |
| 1184 | |
| 1185 | |
| 1186 | class _ActuatorElement(_ElementImpl): |