(self)
| 261 | # minidom-specific API: |
| 262 | |
| 263 | def unlink(self): |
| 264 | self.parentNode = self.ownerDocument = None |
| 265 | if self.childNodes: |
| 266 | for child in self.childNodes: |
| 267 | child.unlink() |
| 268 | self.childNodes = NodeList() |
| 269 | self.previousSibling = None |
| 270 | self.nextSibling = None |
| 271 | |
| 272 | # A Node is its own context manager, to ensure that an unlink() call occurs. |
| 273 | # This is similar to how a file object works. |