Differences From Artifact [dba56f762f]:
- File src/OFXMLParser.h — part of check-in [d8684fc232] at 2009-07-14 18:57:38 on branch trunk — Add OFString (OFXMLUnescaping) category and API for OFXMLParser. (user: js, size: 1293) [annotate] [blame] [check-ins using]
To Artifact [73bf2c69af]:
- File
src/OFXMLParser.h
— part of check-in
[8f4d7a5b74]
at
2009-07-17 15:16:25
on branch trunk
— Initial OFXMLParser implementation. There's still a LOT missing.
Missing stuff includes proper namespace handling, handling of comments,
handling of <?xml ...?>, error handling and much more. (user: js, size: 1780) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
30 31 32 33 34 35 36 | - (BOOL)xmlParser: (OFXMLParser*)parser foundString: (OFString*)string; @end @interface OFXMLParser: OFObject { OFObject <OFXMLParserDelegate> *delegate; | > > > > > > > > > > > | > > > > > > > > > | 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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - (BOOL)xmlParser: (OFXMLParser*)parser foundString: (OFString*)string; @end @interface OFXMLParser: OFObject { OFObject <OFXMLParserDelegate> *delegate; 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 } state; OFString *cache; OFString *name; OFString *prefix; OFString *ns; OFDictionary *attrs; OFString *attr_name; char delim; } + xmlParser; - (id)delegate; - setDelegate: (OFObject <OFXMLParserDelegate>*)delegate; - parseBuffer: (const char*)buf withSize: (size_t)size; @end @protocol OFXMLUnescapingDelegate - (OFString*)foundUnknownEntityNamed: (OFString*)entitiy; @end @interface OFString (OFXMLUnescaping) - stringByXMLUnescaping; - stringByXMLUnescapingWithHandler: (OFObject <OFXMLUnescapingDelegate>*)h; @end |