---
title: "addChild(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/xmldtd/addchild(_:)"
---

# addChild(_:)

Adds a child node to the end of the list of existing children.

## Declaration

```swift
func addChild(_ child: XMLNode)
```

## Parameters

- `child`: The node object to add to the existing children.

## See Also

### Manipulating Child Nodes

- [insertChild(_:at:)](foundation/xmldtd/insertchild(_:at:).md)
- [insertChildren(_:at:)](foundation/xmldtd/insertchildren(_:at:).md)
- [removeChild(at:)](foundation/xmldtd/removechild(at:).md)
- [replaceChild(at:with:)](foundation/xmldtd/replacechild(at:with:).md)
- [setChildren(_:)](foundation/xmldtd/setchildren(_:).md)
