| 161 | return oldChild |
| 162 | |
| 163 | def removeChild(self, oldChild): |
| 164 | try: |
| 165 | self.childNodes.remove(oldChild) |
| 166 | except ValueError: |
| 167 | raise xml.dom.NotFoundErr() |
| 168 | if oldChild.nextSibling is not None: |
| 169 | oldChild.nextSibling.previousSibling = oldChild.previousSibling |
| 170 | if oldChild.previousSibling is not None: |
| 171 | oldChild.previousSibling.nextSibling = oldChild.nextSibling |
| 172 | oldChild.nextSibling = oldChild.previousSibling = None |
| 173 | if oldChild.nodeType in _nodeTypes_with_children: |
| 174 | _clear_id_cache(self) |
| 175 | |
| 176 | oldChild.parentNode = None |
| 177 | return oldChild |
| 178 | |
| 179 | def normalize(self): |
| 180 | L = [] |