27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
*/
#ifndef OF_XML_ELEMENT_BUILDER_M
@protocol OFXMLElementBuilderDelegate <OFObject>
#else
@protocol OFXMLElementBuilderDelegate
#endif
/**
* 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.
*
* \param builder The builder which built an OFXMLElement
* \param elem The OFXMLElement the OFXMLElementBuilder built
*/
- (void)elementBuilder: (OFXMLElementBuilder*)builder
didBuildElement: (OFXMLElement*)element;
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
/**
* 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.
*
|
|
|
|
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
*/
#ifndef OF_XML_ELEMENT_BUILDER_M
@protocol OFXMLElementBuilderDelegate <OFObject>
#else
@protocol OFXMLElementBuilderDelegate
#endif
/**
* \brief 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.
*
* \param builder The builder which built an OFXMLElement
* \param elem The OFXMLElement the OFXMLElementBuilder built
*/
- (void)elementBuilder: (OFXMLElementBuilder*)builder
didBuildElement: (OFXMLElement*)element;
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
/**
* \brief 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.
*
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
*/
- (void)elementBuilder: (OFXMLElementBuilder*)builder
didNotExpectCloseTag: (OFString*)name
withPrefix: (OFString*)prefix
namespace: (OFString*)ns;
/**
* This callback is called when the XML parser for the element builder found an
* unknown entity.
*
* \param entity The name of the entity
* \return The substitution for the entity
*/
- (OFString*)elementBuilder: (OFXMLElementBuilder*)builder
foundUnknownEntityNamed: (OFString*)entity;
@end
|
|
|
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
*/
- (void)elementBuilder: (OFXMLElementBuilder*)builder
didNotExpectCloseTag: (OFString*)name
withPrefix: (OFString*)prefix
namespace: (OFString*)ns;
/**
* \brief This callback is called when the XML parser for the element builder
* found an unknown entity.
*
* \param entity The name of the entity
* \return The substitution for the entity
*/
- (OFString*)elementBuilder: (OFXMLElementBuilder*)builder
foundUnknownEntityNamed: (OFString*)entity;
@end
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
}
#ifdef OF_HAVE_PROPERTIES
@property (retain) id <OFXMLElementBuilderDelegate> delegate;
#endif
/**
* \return A new, autoreleased OFXMLElementBuilder
*/
+ elementBuilder;
/**
* \return The delegate for the OFXMLElementBuilder
*/
- (id <OFXMLElementBuilderDelegate>)delegate;
/**
* Sets the delegate for the OFXMLElementBuilder.
*
* \param delegate The delegate for the OFXMLElementBuilder
*/
- (void)setDelegate: (id <OFXMLElementBuilderDelegate>)delegate;
@end
@interface OFObject (OFXMLElementBuilderDelegate) <OFXMLElementBuilderDelegate>
@end
|
>
>
>
>
|
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
}
#ifdef OF_HAVE_PROPERTIES
@property (retain) id <OFXMLElementBuilderDelegate> delegate;
#endif
/**
* \brief Creates a new element builder.
*
* \return A new, autoreleased OFXMLElementBuilder
*/
+ elementBuilder;
/**
* \brief Returns the delegate for the OFXMLElementBuilder.
*
* \return The delegate for the OFXMLElementBuilder
*/
- (id <OFXMLElementBuilderDelegate>)delegate;
/**
* \brief Sets the delegate for the OFXMLElementBuilder.
*
* \param delegate The delegate for the OFXMLElementBuilder
*/
- (void)setDelegate: (id <OFXMLElementBuilderDelegate>)delegate;
@end
@interface OFObject (OFXMLElementBuilderDelegate) <OFXMLElementBuilderDelegate>
@end
|