# XMLChildPos

Gets the position of a child element within an XML document object.

The position, in an XmlChildren array, of the Nth child that has the specified name.

## Method Signature

```
XMLChildPos(elem=[XML], childname=[string], n=[integer])
```

### Arguments

| Argument    | Type      | Required | Description                                 | Default |
| ----------- | --------- | -------- | ------------------------------------------- | ------- |
| `elem`      | `XML`     | `true`   | The XML DOM object.                         |         |
| `childname` | `string`  | `true`   | The name of the child element.              |         |
| `n`         | `integer` | `true`   | The position of the child element. 1-based. |         |

## Examples

## Related

* [XMLElemNew](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlelemnew)
* [XMLFormat](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlformat)
* [XMLGetNodeType](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlgetnodetype)
* [XMLNew](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlnew)
* [XMLParse](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlparse)
* [XMLSearch](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlsearch)
* [XMLTransform](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmltransform)
* [XMLValidate](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/xml/xmlvalidate)
