ObjFW
Public Member Functions
<OFXMLElementBuilderDelegate> Protocol Reference

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

#include <OFXMLElementBuilder.h>

Inheritance diagram for <OFXMLElementBuilderDelegate>:
<OFObject>

List of all members.

Public Member Functions

void elementBuilder:didBuildElement: (OFXMLElementBuilder *builder,[didBuildElement] OFXMLElement *elem)
void elementBuilder:didNotExpectCloseTag:withPrefix:namespace: (OFXMLElementBuilder *builder,[didNotExpectCloseTag] OFString *name,[withPrefix] OFString *prefix,[namespace] OFString *ns)

Detailed Description

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


Member Function Documentation

void OFXMLElementBuilderDelegate-p::elementBuilder:didBuildElement: ( OFXMLElementBuilder builder,
[didBuildElement] OFXMLElement elem 
) [virtual]

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
elemThe OFXMLElement the OFXMLElementBuilder built
void OFXMLElementBuilderDelegate-p::elementBuilder:didNotExpectCloseTag:withPrefix:namespace: ( OFXMLElementBuilder builder,
[didNotExpectCloseTag] OFString name,
[withPrefix] OFString prefix,
[namespace] OFString ns 
) [optional, virtual]

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

The documentation for this protocol was generated from the following file:
 All Classes Functions Variables