---
title: "removeAttribute(forName:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/xmlelement/removeattribute(forname:)"
---

# removeAttribute(forName:)

Removes an attribute node identified by name.

## Declaration

```swift
func removeAttribute(forName name: String)
```

## Parameters

- `name`: A string specifying the name of an attribute.

## See Also

### Handling Attributes

- [addAttribute(_:)](foundation/xmlelement/addattribute(_:).md)
- [attribute(forName:)](foundation/xmlelement/attribute(forname:).md)
- [attribute(forLocalName:uri:)](foundation/xmlelement/attribute(forlocalname:uri:).md)
- [attributes](foundation/xmlelement/attributes.md)
- [setAttributesWith(_:)](foundation/xmlelement/setattributeswith(_:).md)
- [setAttributesAs(_:)](foundation/xmlelement/setattributesas(_:).md)
