35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
@optional
/**
* @brief This callback is called when the XML parser found a processing
* instruction.
*
* @param parser The parser which found a processing instruction
* @param target The target of the processing instruction
* @param data The data of the processing instruction
*/
- (void)parser: (OFXMLParser *)parser
foundProcessingInstructionWithTarget: (OFString *)target
data: (OFString *)data;
/**
* @brief This callback is called when the XML parser found the start of a new
* tag.
*
* @param parser The parser which found a new tag
* @param name The name of the tag which just started
* @param prefix The prefix of the tag which just started or `nil`
* @param ns The namespace of the tag which just started or `nil`
* @param attributes The attributes included in the tag which just started or
* `nil`
*/
- (void)parser: (OFXMLParser *)parser
didStartElement: (OFString *)name
prefix: (nullable OFString *)prefix
namespace: (nullable OFString *)ns
attributes: (nullable 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`
* @param ns The namespace of the tag which just ended or `nil`
*/
- (void)parser: (OFXMLParser *)parser
didEndElement: (OFString *)name
prefix: (nullable OFString *)prefix
namespace: (nullable OFString *)ns;
/**
* @brief 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.
*
|
|
|
|
|
|
|
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
@optional
/**
* @brief This callback is called when the XML parser found a processing
* instruction.
*
* @param parser The parser which found a processing instruction
* @param target The target of the processing instruction
* @param text The text of the processing instruction
*/
- (void)parser: (OFXMLParser *)parser
foundProcessingInstructionWithTarget: (OFString *)target
text: (OFString *)text;
/**
* @brief This callback is called when the XML parser found the start of a new
* tag.
*
* @param parser The parser which found a new tag
* @param name The name of the tag which just started
* @param prefix The prefix of the tag which just started or `nil`
* @param nameSpace The namespace of the tag which just started or `nil`
* @param attributes The attributes included in the tag which just started or
* `nil`
*/
- (void)parser: (OFXMLParser *)parser
didStartElement: (OFString *)name
prefix: (nullable OFString *)prefix
namespace: (nullable OFString *)nameSpace
attributes: (nullable 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`
* @param nameSpace The namespace of the tag which just ended or `nil`
*/
- (void)parser: (OFXMLParser *)parser
didEndElement: (OFString *)name
prefix: (nullable OFString *)prefix
namespace: (nullable OFString *)nameSpace;
/**
* @brief 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.
*
|
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
+ (instancetype)parser;
/**
* @brief Parses the specified buffer with the specified size.
*
* @param buffer The buffer to parse
* @param length The length of the buffer
*/
- (void)parseBuffer: (const char *)buffer length: (size_t)length;
/**
* @brief Parses the specified string.
*
* @param string The string to parse
*/
- (void)parseString: (OFString *)string;
/**
* @brief Parses the specified stream.
*
* @param stream The stream to parse
*/
- (void)parseStream: (OFStream *)stream;
@end
OF_ASSUME_NONNULL_END
|
>
>
>
>
>
>
>
>
>
>
>
>
|
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
+ (instancetype)parser;
/**
* @brief Parses the specified buffer with the specified size.
*
* @param buffer The buffer to parse
* @param length The length of the buffer
* @throw OFMalformedXMLException The XML was malformed
* @throw OFUnboundPrefixException A prefix was used that was not bound to any
* namespace
* @throw OFInvalidEncodingException The XML is not in the encoding it specified
*/
- (void)parseBuffer: (const char *)buffer length: (size_t)length;
/**
* @brief Parses the specified string.
*
* @param string The string to parse
* @throw OFMalformedXMLException The XML was malformed
* @throw OFUnboundPrefixException A prefix was used that was not bound to any
* namespace
* @throw OFInvalidEncodingException The XML is not in the encoding it specified
*/
- (void)parseString: (OFString *)string;
/**
* @brief Parses the specified stream.
*
* @param stream The stream to parse
* @throw OFMalformedXMLException The XML was malformed
* @throw OFUnboundPrefixException A prefix was used that was not bound to any
* namespace
* @throw OFInvalidEncodingException The XML is not in the encoding it specified
*/
- (void)parseStream: (OFStream *)stream;
@end
OF_ASSUME_NONNULL_END
|