ObjFW
 All Classes Functions Variables
Instance Methods | List of all members
<OFXMLElementBuilderDelegate> Protocol Referenceabstract

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

#import <OFXMLElementBuilder.h>

Inheritance diagram for <OFXMLElementBuilderDelegate>:
<OFObject>

Instance Methods

(void) - elementBuilder:didBuildElement:
 This callback is called when the OFXMLElementBuilder built an element.
 
(void) - elementBuilder:didBuildParentlessNode:
 This callback is called when the OFXMLElementBuilder built an OFXMLNode which is not inside an element.
 
(void) - elementBuilder:didNotExpectCloseTag:withPrefix:namespace:
 This callback is called when the OFXMLElementBuilder gets a close tag which does not belong there.
 
(OFString *) - elementBuilder:foundUnknownEntityNamed:
 This callback is called when the XML parser for the element builder found an unknown entity.
 
- Instance Methods inherited from <OFObject>
(Class) - class
 Returns the class of the object.
 
(BOOL) - isKindOfClass:
 Returns a boolean whether the object 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.
 
(IMP) - methodForSelector:
 Returns the implementation for the specified selector.
 
(const char *) - typeEncodingForSelector:
 Returns the type encoding for the specified selector.
 
(id) - performSelector:
 Performs the specified selector.
 
(id) - performSelector:withObject:
 Performs the specified selector with the specified object.
 
(id) - performSelector:withObject:withObject:
 Performs the specified selector with the specified objects.
 
(BOOL) - isEqual:
 Checks two objects for equality.
 
(uint32_t) - hash
 Calculates a hash for the object.
 
(id) - retain
 Increases the retain count.
 
(unsigned int) - retainCount
 Returns the retain count.
 
(void) - release
 Decreases the retain count.
 
(id) - autorelease
 Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack.
 
(id) - self
 Returns the receiver.
 
(BOOL) - isProxy
 Returns whether the object is a proxy object.
 

Detailed Description

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

Method Documentation

- (void) elementBuilder: (OFXMLElementBuilder *)  builder
didBuildElement: (OFXMLElement *)  element 

This callback is called when the OFXMLElementBuilder built an element.

If the OFXMLElementBuilder was used as a delegate for the OFXMLParser since parsing started, this will return the complete document as an OFXMLElement with all children.

Parameters
builderThe builder which built an OFXMLElement
elementThe OFXMLElement the OFXMLElementBuilder built
- (void) elementBuilder: (OFXMLElementBuilder *)  builder
didBuildParentlessNode: (OFXMLNode *)  node 

This callback is called when the OFXMLElementBuilder built an OFXMLNode which is not inside an element.

This is usually called for comments or whitespace character data before the root element.

Parameters
builderThe builder which built the OFXMLNode without parent
nodeThe OFXMLNode the OFXMLElementBuilder built
- (void) elementBuilder: (OFXMLElementBuilder *)  builder
didNotExpectCloseTag: (OFString *)  name
withPrefix: (OFString *)  prefix
namespace: (OFString *)  ns 

This callback is called when the OFXMLElementBuilder gets a close tag which does not belong there.

Most likely, the OFXMLElementBuilder was used to build XML only of a child of the root element and the root element was closed. Often the delegate is set to the OFXMLElementBuilder when a certain element is found, this can be used then to set the delegate back after that certain element has been closed.

If this method is not implemented in the delegate, the default is to throw an OFMalformedXMLException.

Parameters
builderThe builder which did not expect the close tag
nameThe name of the close tag
prefixThe prefix of the close tag
nsThe namespace of the close tag
- (OFString*) elementBuilder: (OFXMLElementBuilder *)  builder
foundUnknownEntityNamed: (OFString *)  entity 

This callback is called when the XML parser for the element builder found an unknown entity.

Parameters
builderThe element builder which found an unknown entity
entityThe name of the entity
Returns
The substitution for the entity

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