| 1825 | return _clone_node(node, deep, self) |
| 1826 | |
| 1827 | def writexml(self, writer, indent="", addindent="", newl="", encoding=None, |
| 1828 | standalone=None): |
| 1829 | declarations = [] |
| 1830 | |
| 1831 | if encoding: |
| 1832 | declarations.append(f'encoding="{encoding}"') |
| 1833 | if standalone is not None: |
| 1834 | declarations.append(f'standalone="{"yes" if standalone else "no"}"') |
| 1835 | |
| 1836 | writer.write(f'<?xml version="1.0" {" ".join(declarations)}?>{newl}') |
| 1837 | |
| 1838 | for node in self.childNodes: |
| 1839 | node.writexml(writer, indent, addindent, newl) |
| 1840 | |
| 1841 | # DOM Level 3 (WD 9 April 2002) |
| 1842 | |