An event-based XML parser. More...
#import <OFXMLParser.h>
Public Member Functions | |
(id) | - delegate |
(void) | - setDelegate: |
(void) | - parseBuffer:withSize: |
Static Public Member Functions | |
(id) | + xmlParser |
Protected Types | |
enum | { OF_XMLPARSER_OUTSIDE_TAG, OF_XMLPARSER_TAG_OPENED, OF_XMLPARSER_IN_TAG_NAME, OF_XMLPARSER_IN_CLOSE_TAG_NAME, OF_XMLPARSER_IN_TAG, OF_XMLPARSER_IN_ATTR_NAME, OF_XMLPARSER_EXPECT_DELIM, OF_XMLPARSER_IN_ATTR_VALUE, OF_XMLPARSER_EXPECT_CLOSE, OF_XMLPARSER_EXPECT_SPACE_OR_CLOSE, OF_XMLPARSER_IN_COMMENT_1, OF_XMLPARSER_IN_COMMENT_2, OF_XMLPARSER_IN_COMMENT_3, OF_XMLPARSER_IN_COMMENT_4 } |
Protected Attributes | |
OFObject< OFXMLParserDelegate > * | delegate |
enum OFXMLParser:: { ... } | state |
OFMutableString * | cache |
OFString * | name |
OFString * | prefix |
OFString * | ns |
OFMutableArray * | attrs |
OFString * | attrName |
OFString * | attrPrefix |
char | delim |
OFMutableArray * | previous |
An event-based XML parser.
OFXMLParser is an event-based XML parser which calls the delegate's callbacks as soon asit finds something, thus suitable for streams as well.
- (id) delegate |
- (void) parseBuffer: | (const char *) | buf | ||
withSize: | (size_t) | size | ||
Parses a buffer with the specified size.
buf | The buffer to parse | |
size | The size of the buffer |
- (void) setDelegate: | (OFObject< OFXMLParserDelegate > *) | delegate |
Sets the delegate the OFXMLParser should use.
delegate | The delegate to use |
+ (id) xmlParser |