
## replace_child {#aspose.svg.dom.Node-aspose.svg.dom.Node}

Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. 
If newChild is a DocumentFragment object, oldChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed.


### Returns 


Returns node


```python
def replace_child(self, node, child):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| node | aspose.svg.dom.Node | The new node. |
| child | aspose.svg.dom.Node | The old child. |



### See Also
* module [`aspose.svg`](../../)
* class [`Node`](/svg/python-net/aspose.svg.dom/node)
* class [`SVGRectElement`](/svg/python-net/aspose.svg/svgrectelement)
