---
title: "elementDeclaration(forName:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/xmldtd/elementdeclaration(forname:)"
---

# elementDeclaration(forName:)

Returns the DTD node representing an element declaration for a specified element.

## Declaration

```swift
func elementDeclaration(forName name: String) -> XMLDTDNode?
```

## Parameters

- `name`: A string that is the name of an element.

## Return Value

Return Value An autoreleased XMLDTDNode object, or nil if there is no match.

## See Also

### Getting DTD Nodes by Name

- [predefinedEntityDeclaration(forName:)](foundation/xmldtd/predefinedentitydeclaration(forname:).md)
- [attributeDeclaration(forName:elementName:)](foundation/xmldtd/attributedeclaration(forname:elementname:).md)
- [entityDeclaration(forName:)](foundation/xmldtd/entitydeclaration(forname:).md)
- [notationDeclaration(forName:)](foundation/xmldtd/notationdeclaration(forname:).md)
