---
title: "insertChildren(_:at:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/xmldtd/insertchildren(_:at:)"
---

# insertChildren(_:at:)

Inserts an array of child nodes at a specified location in the receiver’s list of children.

## Declaration

```swift
func insertChildren(_ children: [XMLNode], at index: Int)
```

## Parameters

- `children`: An array of doc://com.apple.foundation/documentation/Foundation/XMLNode objects to insert as children of the receiver.
- `index`: An integer identifying the location in the list of current children to make the insertion. The indices of subsequent children in the list are incremented by the number of inserted children.

## See Also

### Manipulating Child Nodes

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