ObjFW
Instance Methods | List of all members
<OFXMLParserDelegate> Protocol Reference

A protocol that needs to be implemented by delegates for OFXMLParser. More...

#import <ObjFW/OFXMLParser.h>

Inheritance diagram for <OFXMLParserDelegate>:
<OFObject> OFXMLElementBuilder

Instance Methods

(void) - parser:foundProcessingInstructions:
 This callback is called when the XML parser found processing instructions. More...
 
(void) - parser:didStartElement:prefix:namespace:attributes:
 This callback is called when the XML parser found the start of a new tag. More...
 
(void) - parser:didEndElement:prefix:namespace:
 This callback is called when the XML parser found the end of a tag. More...
 
(void) - parser:foundCharacters:
 This callback is called when the XML parser found characters. More...
 
(void) - parser:foundCDATA:
 This callback is called when the XML parser found CDATA. More...
 
(void) - parser:foundComment:
 This callback is called when the XML parser found a comment. More...
 
(OFString *) - parser:foundUnknownEntityNamed:
 This callback is called when the XML parser found an entity it doesn't know. More...
 
- Instance Methods inherited from <OFObject>
(Class) - class
 Returns the class of the object. More...
 
(Class) - superclass
 Returns the superclass of the object. More...
 
(bool) - isKindOfClass:
 Returns a boolean whether the object of the specified kind. More...
 
(bool) - isMemberOfClass:
 Returns a boolean whether the object is a member of the specified class. More...
 
(bool) - respondsToSelector:
 Returns a boolean whether the object responds to the specified selector. More...
 
(bool) - conformsToProtocol:
 Checks whether the object conforms to the specified protocol. More...
 
(nullable IMP) - methodForSelector:
 Returns the implementation for the specified selector. More...
 
(nullable const char *) - typeEncodingForSelector:
 Returns the type encoding for the specified selector. More...
 
(nullable id) - performSelector:
 Performs the specified selector. More...
 
(nullable id) - performSelector:withObject:
 Performs the specified selector with the specified object. More...
 
(nullable id) - performSelector:withObject:withObject:
 Performs the specified selector with the specified objects. More...
 
(bool) - isEqual:
 Checks two objects for equality. More...
 
(uint32_t) - hash
 Calculates a hash for the object. More...
 
(id) - retain
 Increases the retain count. More...
 
(unsigned int) - retainCount
 Returns the retain count. More...
 
(void) - release
 Decreases the retain count. More...
 
(id) - autorelease
 Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack. More...
 
(id) - self
 Returns the receiver. More...
 
(bool) - isProxy
 Returns whether the object is a proxy object. More...
 

Detailed Description

A protocol that needs to be implemented by delegates for OFXMLParser.

Method Documentation

- (void) parser: (OFXMLParser *)  parser
didEndElement: (OFString *)  name
prefix: (nullable OFString *)  prefix
namespace: (nullable OFString *)  ns 
optional

This callback is called when the XML parser found the end of a tag.

Parameters
parserThe parser which found the end of a tag
nameThe name of the tag which just ended
prefixThe prefix of the tag which just ended or nil
nsThe namespace of the tag which just ended or nil
- (void) parser: (OFXMLParser *)  parser
didStartElement: (OFString *)  name
prefix: (nullable OFString *)  prefix
namespace: (nullable OFString *)  ns
attributes: (nullable OFArray OF_GENERIC(OFXMLAttribute *)*)  attributes 
optional

This callback is called when the XML parser found the start of a new tag.

Parameters
parserThe parser which found a new tag
nameThe name of the tag which just started
prefixThe prefix of the tag which just started or nil
nsThe namespace of the tag which just started or nil
attributesThe attributes included in the tag which just started or nil
- (void) parser: (OFXMLParser *)  parser
foundCDATA: (OFString *)  CDATA 
optional

This callback is called when the XML parser found CDATA.

Parameters
parserThe parser which found a string
CDATAThe CDATA the XML parser found
- (void) parser: (OFXMLParser *)  parser
foundCharacters: (OFString *)  characters 
optional

This callback is called when the XML parser found characters.

In case there are comments or CDATA, it is possible that this callback is called multiple times in a row.

Parameters
parserThe parser which found a string
charactersThe characters the XML parser found
- (void) parser: (OFXMLParser *)  parser
foundComment: (OFString *)  comment 
optional

This callback is called when the XML parser found a comment.

Parameters
parserThe parser which found a comment
commentThe comment the XML parser found
- (void) parser: (OFXMLParser *)  parser
foundProcessingInstructions: (OFString *)  pi 
optional

This callback is called when the XML parser found processing instructions.

Parameters
parserThe parser which found processing instructions
piThe processing instructions
- (OFString*) parser: (OFXMLParser *)  parser
foundUnknownEntityNamed: (OFString *)  entity 
optional

This callback is called when the XML parser found an entity it doesn't know.

The callback is supposed to return a substitution for the entity or nil if it is not known to the callback as well, in which case an exception will be risen.

Parameters
parserThe parser which found an unknown entity
entityThe name of the entity the XML parser didn't know
Returns
A substitution for the entity or nil

The documentation for this protocol was generated from the following file: