ObjFW
|
An event-based XML parser. More...
#import <OFXMLParser.h>
Public Member Functions | |
(id< OFXMLParserDelegate >) | - delegate |
Returns the delegate that is used by the XML parser. | |
(void) | - setDelegate: |
Sets the delegate the OFXMLParser should use. | |
(void) | - parseBuffer:withLength: |
Parses the specified buffer with the specified size. | |
(void) | - parseString: |
Parses the specified string. | |
(void) | - parseStream: |
Parses the specified stream. | |
(void) | - parseFile: |
Parses the specified file. | |
(size_t) | - lineNumber |
Returns the current line number. | |
(BOOL) | - finishedParsing |
Returns whether the XML parser has finished parsing. | |
Static Public Member Functions | |
(id) | + parser |
Creates a new XML parser. |
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 <OFXMLParserDelegate>) delegate |
Returns the delegate that is used by the XML parser.
- (BOOL) finishedParsing |
Returns whether the XML parser has finished parsing.
- (size_t) lineNumber |
Returns the current line number.
- (void) parseBuffer: | (const char*) | buffer | |
withLength: | (size_t) | length | |
Parses the specified buffer with the specified size.
buffer | The buffer to parse |
length | The length of the buffer |
- (void) parseFile: | (OFString*) | path |
Parses the specified file.
path | The path to the file to parse |
+ (id) parser |
Creates a new XML parser.
- (void) parseStream: | (OFStream*) | stream |
Parses the specified stream.
stream | The stream to parse |
- (void) parseString: | (OFString*) | string |
Parses the specified string.
string | The string to parse |
- (void) setDelegate: | (id <OFXMLParserDelegate>) | delegate |
Sets the delegate the OFXMLParser should use.
delegate | The delegate to use |