Contents

parser(_:parseErrorOccurred:)

Sent by a parser object to its delegate when it encounters a fatal error.

Declaration

optional func parser(_ parser: XMLParser, parseErrorOccurred parseError: any Error)

Parameters

  • parser:

    A parser object.

  • parseError:

    An Nserror object describing the parsing error that occurred.

Discussion

When this method is invoked, parsing is stopped. For further information about the error, you can query parseError or you can send the parser a parserError message. You can also send the parser lineNumber and columnNumber messages to further isolate where the error occurred. Typically you implement this method to display information about the error to the user.

See Also

Handling XML