---
title: "parser(_:foundExternalEntityDeclarationWithName:publicID:systemID:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/xmlparserdelegate/parser(_:foundexternalentitydeclarationwithname:publicid:systemid:)"
---

# parser(_:foundExternalEntityDeclarationWithName:publicID:systemID:)

Sent by a parser object to its delegate when it encounters an external entity declaration.

## Declaration

```swift
optional func parser(_ parser: XMLParser, foundExternalEntityDeclarationWithName name: String, publicID: String?, systemID: String?)
```

## Parameters

- `parser`: An NSXMLParser object parsing XML.
- `name`: A string that is the name of an entity.
- `publicID`: A string that specifies the public ID associated with entityName.
- `systemID`: A string that specifies the system ID associated with entityName.

## See Also

### Related Documentation

- [parser(_:resolveExternalEntityName:systemID:)](foundation/xmlparserdelegate/parser(_:resolveexternalentityname:systemid:).md)

### Handling the DTD

- [parser(_:foundAttributeDeclarationWithName:forElement:type:defaultValue:)](foundation/xmlparserdelegate/parser(_:foundattributedeclarationwithname:forelement:type:defaultvalue:).md)
- [parser(_:foundElementDeclarationWithName:model:)](foundation/xmlparserdelegate/parser(_:foundelementdeclarationwithname:model:).md)
- [parser(_:foundInternalEntityDeclarationWithName:value:)](foundation/xmlparserdelegate/parser(_:foundinternalentitydeclarationwithname:value:).md)
- [parser(_:foundUnparsedEntityDeclarationWithName:publicID:systemID:notationName:)](foundation/xmlparserdelegate/parser(_:foundunparsedentitydeclarationwithname:publicid:systemid:notationname:).md)
- [parser(_:foundNotationDeclarationWithName:publicID:systemID:)](foundation/xmlparserdelegate/parser(_:foundnotationdeclarationwithname:publicid:systemid:).md)
