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

# entityDeclaration(forName:)

Returns the DTD node representing the entity declaration for a specified entity.

## Declaration

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

## Parameters

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

## 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)
- [elementDeclaration(forName:)](foundation/xmldtd/elementdeclaration(forname:).md)
- [attributeDeclaration(forName:elementName:)](foundation/xmldtd/attributedeclaration(forname:elementname:).md)
- [notationDeclaration(forName:)](foundation/xmldtd/notationdeclaration(forname:).md)
