## Node.ReplaceChild method

将子节点列表中的子节点oldChild替换为newChild，并返回oldChild节点。 如果 newChild 是一个 DocumentFragment 对象，则 oldChild 将替换为所有 DocumentFragment 子对象，它们以相同的顺序插入。如果 newChild 已经在树中，则首先将其删除。

```csharp
public Node ReplaceChild(Node node, Node child)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| node | Node | 新节点。 |
| child | Node | 老孩子。 |

### 返回值

返回节点

### 也可以看看

* class [Node](../)
* 命名空间 [Aspose.Html.Dom](../../node/)
* 部件 [Aspose.HTML](../../../)


