Contents

parser(_:foundCharacters:)

Sent by a parser object to provide its delegate with a string representing all or part of the characters of the current element.

Declaration

optional func parser(_ parser: XMLParser, foundCharacters string: String)

Parameters

  • parser:

    A parser object.

  • string:

    A string representing the complete or partial textual content of the current element.

Discussion

The parser object may send the delegate several parser(_:foundCharacters:) messages to report the characters of an element. Because string may be only part of the total character content for the current element, you should append it to the current accumulation of characters until the element changes.

See Also

Handling XML