Initializer

init(data:)

Initializes a parser with the XML contents encapsulated in a given data object.

Declaration

init(data: Data)

Parameters

data

An NSData object containing XML markup.

Return Value

An initialized NSXMLParser object or nil if an error occurs.

Discussion

This method is the designated initializer.

See Also

Initializing a Parser Object

init?(contentsOf: URL)

Initializes a parser with the XML content referenced by the given URL.

init(stream: InputStream)

Initializes a parser with the XML contents from the specified stream and parses it..