---
title: abortParsing()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/xmlparser/abortparsing()
---

# abortParsing()

Stops the parser object.

## Declaration

```swift
func abortParsing()
```

## Discussion

Discussion If you invoke this method, the delegate, if it implements parser(_:parseErrorOccurred:), is informed of the cancelled parsing operation.

## See Also

### Parsing

- [parse()](foundation/xmlparser/parse().md)
- [parserError](foundation/xmlparser/parsererror.md)
