---
title: publicID
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/xmlparser/publicid
---

# publicID

The public identifier of the external entity referenced in the XML document.

## Declaration

```swift
var publicID: String? { get }
```

## Discussion

Discussion You may access this property once a parsing operation has begun or after an error occurs.

## See Also

### Obtaining Parser State

- [columnNumber](foundation/xmlparser/columnnumber.md)
- [lineNumber](foundation/xmlparser/linenumber.md)
- [systemID](foundation/xmlparser/systemid.md)
