# xmlDeleteAt

Removes a node from an XML document by specifying the position




### Syntax

```
xmlDeleteAt(xmlObject, position) returns void
```






## Argument Reference

| Name | Type | Required | Default | Description | Values |
| --- | --- | --- | --- | --- | --- |
| xmlObject | xml | Yes |  | The XML object |  |
| position | numeric | Yes |  | The position of the child node to be deleted |  |





## CFML Engine Support

The xmlDeleteAt function is supported on the following CFML engines:

| Engine | Minimum Version | Notes |
| --- | --- | --- |
| ColdFusion | 2023 |  |




## Examples


### Delete a specified XML node (Script syntax)

Deletes a single node in a simple XML document

```
xmlData = xmlParse('<root><item id="1">Item 1</item><item id="2">Item 2</item><item id="3">Item 3</item></root>');
xmlDeleteAt(xmlData.root.item, 1);
writeOutput(xmlData.toString());
```
Expected Result: <?xml version="1.0" encoding="UTF-8"?>
<root><item id="2">Item 2</item><item/><item id="3">Item 3</item></root>





## Related Tags and Functions

[xmlChildPos](https://cfdocs.org/xmlChildPos.md)
[xmlClear](https://cfdocs.org/xmlClear.md)




The human version of this document can be found here: [https://cfdocs.org/xmldeleteat](https://cfdocs.org/xmldeleteat) which is part of the cfdocs.org repository. Project created by [Pete Freitag](https://www.petefreitag.com) and sponsored by [Foundeo Inc.](https://foundeo.com/)
