| 1814 | return _clone_node(node, deep, self) |
| 1815 | |
| 1816 | def writexml(self, writer, indent="", addindent="", newl="", encoding=None, |
| 1817 | standalone=None): |
| 1818 | declarations = [] |
| 1819 | |
| 1820 | if encoding: |
| 1821 | declarations.append(f'encoding="{encoding}"') |
| 1822 | if standalone is not None: |
| 1823 | declarations.append(f'standalone="{"yes" if standalone else "no"}"') |
| 1824 | |
| 1825 | writer.write(f'<?xml version="1.0" {" ".join(declarations)}?>{newl}') |
| 1826 | |
| 1827 | for node in self.childNodes: |
| 1828 | node.writexml(writer, indent, addindent, newl) |
| 1829 | |
| 1830 | # DOM Level 3 (WD 9 April 2002) |
| 1831 | |