ObjFW
Loading...
Searching...
No Matches
Instance Methods | List of all members
<OFXMLParserDelegate> Protocol Reference

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

#include <ObjFW/OFXMLParser.h>

Inheritance diagram for <OFXMLParserDelegate>:
<OFObject> OFXMLElementBuilder

Instance Methods

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

Detailed Description

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

Method Documentation

◆ parser:didEndElement:prefix:namespace:

- (void) parser: (OFXMLParser *) parser
didEndElement: (OFString *) name
prefix: (nullable OFString *) prefix
namespace: (nullable OFString *) nameSpace 
optionalrequired

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
nameSpaceThe namespace of the tag which just ended or nil

◆ parser:didStartElement:prefix:namespace:attributes:

- (void) parser: (OFXMLParser *) parser
didStartElement: (OFString *) name
prefix: (nullable OFString *) prefix
namespace: (nullable OFString *) nameSpace
attributes: (nullable OFArray *) attributes 
optionalrequired

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
nameSpaceThe namespace of the tag which just started or nil
attributesThe attributes included in the tag which just started or nil

◆ parser:foundCDATA:

- (void) parser: (OFXMLParser *) parser
foundCDATA: (OFString *) CDATA 
optionalrequired

This callback is called when the XML parser found CDATA.

Parameters
parserThe parser which found a string
CDATAThe CDATA the XML parser found

◆ parser:foundCharacters:

- (void) parser: (OFXMLParser *) parser
foundCharacters: (OFString *) characters 
optionalrequired

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

◆ parser:foundComment:

- (void) parser: (OFXMLParser *) parser
foundComment: (OFString *) comment 
optionalrequired

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

Parameters
parserThe parser which found a comment
commentThe comment the XML parser found

◆ parser:foundProcessingInstructionWithTarget:text:

- (void) parser: (OFXMLParser *) parser
foundProcessingInstructionWithTarget: (OFString *) target
text: (nullable OFString *) text 
optional

This callback is called when the XML parser found a processing instruction.

Parameters
parserThe parser which found a processing instruction
targetThe target of the processing instruction
textThe text of the processing instruction

◆ parser:foundUnknownEntityNamed:

- (nullable OFString *) parser: (OFXMLParser *) parser
foundUnknownEntityNamed: (OFString *) entity 
optionalrequired

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: