15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
*/
#import "OFObject.h"
#import "OFString.h"
#import "OFXMLAttribute.h"
@class OFXMLParser;
@class OFArray;
@class OFMutableArray;
@class OFDataArray;
@class OFStream;
/*!
* @protocol OFXMLParserDelegate OFXMLParser.h ObjFW/OFXMLParser.h
*
* @brief A protocol that needs to be implemented by delegates for OFXMLParser.
|
>
|
|
>
>
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
*/
#import "OFObject.h"
#import "OFString.h"
#import "OFXMLAttribute.h"
@class OFXMLParser;
#ifndef DOXYGEN
@class OFArray OF_GENERIC(ObjectType);
@class OFMutableArray OF_GENERIC(ObjectType);
@class OFMutableDictionary OF_GENERIC(KeyType, ObjectType);
#endif
@class OFDataArray;
@class OFStream;
/*!
* @protocol OFXMLParserDelegate OFXMLParser.h ObjFW/OFXMLParser.h
*
* @brief A protocol that needs to be implemented by delegates for OFXMLParser.
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
* @param attributes The attributes included in the tag which just started or
* nil
*/
- (void)parser: (OFXMLParser*)parser
didStartElement: (OFString*)name
prefix: (OFString*)prefix
namespace: (OFString*)ns
attributes: (OFArray*)attributes;
/*!
* @brief This callback is called when the XML parser found the end of a tag.
*
* @param parser The parser which found the end of a tag
* @param name The name of the tag which just ended
* @param prefix The prefix of the tag which just ended or nil
|
|
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
* @param attributes The attributes included in the tag which just started or
* nil
*/
- (void)parser: (OFXMLParser*)parser
didStartElement: (OFString*)name
prefix: (OFString*)prefix
namespace: (OFString*)ns
attributes: (OFArray OF_GENERIC(OFXMLAttribute*)*)attributes;
/*!
* @brief This callback is called when the XML parser found the end of a tag.
*
* @param parser The parser which found the end of a tag
* @param name The name of the tag which just ended
* @param prefix The prefix of the tag which just ended or nil
|
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
OF_XMLPARSER_IN_DOCTYPE,
OF_XMLPARSER_NUM_STATES
} _state;
size_t _i, _last;
const char *_data;
OFDataArray *_buffer;
OFString *_name, *_prefix;
OFMutableArray *_namespaces, *_attributes;
OFString *_attributeName, *_attributePrefix;
char _delimiter;
OFMutableArray *_previous;
size_t _level;
bool _acceptProlog;
size_t _lineNumber;
bool _lastCarriageReturn, _finishedParsing;
of_string_encoding_t _encoding;
size_t _depthLimit;
}
|
|
>
>
>
|
|
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
OF_XMLPARSER_IN_DOCTYPE,
OF_XMLPARSER_NUM_STATES
} _state;
size_t _i, _last;
const char *_data;
OFDataArray *_buffer;
OFString *_name, *_prefix;
OFMutableArray
OF_GENERIC(OFMutableDictionary OF_GENERIC(OFString*, OFString*)*)
*_namespaces;
OFMutableArray OF_GENERIC(OFXMLAttribute*) *_attributes;
OFString *_attributeName, *_attributePrefix;
char _delimiter;
OFMutableArray OF_GENERIC(OFString*) *_previous;
size_t _level;
bool _acceptProlog;
size_t _lineNumber;
bool _lastCarriageReturn, _finishedParsing;
of_string_encoding_t _encoding;
size_t _depthLimit;
}
|