Protocol

NSXMLParserDelegate

The interface an XML parser uses to inform its delegate about the content of the parsed document.

Topics

Handling XML

parserDidStartDocument:

Sent by the parser object to the delegate when it begins parsing a document.

parserDidEndDocument:

Sent by the parser object to the delegate when it has successfully completed parsing.

parser:didStartElement:namespaceURI:qualifiedName:attributes:

Sent by a parser object to its delegate when it encounters a start tag for a given element.

parser:didEndElement:namespaceURI:qualifiedName:

Sent by a parser object to its delegate when it encounters an end tag for a specific element.

parser:didStartMappingPrefix:toURI:

Sent by a parser object to its delegate the first time it encounters a given namespace prefix, which is mapped to a URI.

parser:didEndMappingPrefix:

Sent by a parser object to its delegate when a given namespace prefix goes out of scope.

parser:resolveExternalEntityName:systemID:

Sent by a parser object to its delegate when it encounters a given external entity with a specific system ID.

parser:parseErrorOccurred:

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

parser:validationErrorOccurred:

Sent by a parser object to its delegate when it encounters a fatal validation error. NSXMLParser currently does not invoke this method and does not perform validation.

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.

parser:foundIgnorableWhitespace:

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

parser:foundProcessingInstructionWithTarget:data:

Sent by a parser object to its delegate when it encounters a processing instruction.

parser:foundComment:

Sent by a parser object to its delegate when it encounters a comment in the XML.

parser:foundCDATA:

Sent by a parser object to its delegate when it encounters a CDATA block.

Handling the DTD

parser:foundAttributeDeclarationWithName:forElement:type:defaultValue:

Sent by a parser object to its delegate when it encounters a declaration of an attribute that is associated with a specific element.

parser:foundElementDeclarationWithName:model:

Sent by a parser object to its delegate when it encounters a declaration of an element with a given model.

parser:foundExternalEntityDeclarationWithName:publicID:systemID:

Sent by a parser object to its delegate when it encounters an external entity declaration.

parser:foundInternalEntityDeclarationWithName:value:

Sent by a parser object to the delegate when it encounters an internal entity declaration.

parser:foundUnparsedEntityDeclarationWithName:publicID:systemID:notationName:

Sent by a parser object to its delegate when it encounters an unparsed entity declaration.

parser:foundNotationDeclarationWithName:publicID:systemID:

Sent by a parser object to its delegate when it encounters a notation declaration.

Relationships

Inherits From

See Also

Event-Based Processing

NSXMLParser

An event driven parser of XML documents (including DTD declarations).