ObjFW  Check-in [c1f392e534]

Overview
Comment:Rename +[xmlParser] to +[parser].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c1f392e53427c02d43482a16d71a4ef0e19f93d197604fb38aae3f65db0ab99d
User & Date: js on 2010-07-02 21:05:39
Other Links: manifest | tags
Context
2010-07-02
21:40
Add OFXMLElementBuilder. check-in: ad93296956 user: js tags: trunk
21:05
Rename +[xmlParser] to +[parser]. check-in: c1f392e534 user: js tags: trunk
20:56
Add support for CDATA to OFXMLElement. check-in: e2499be5c1 user: js tags: trunk
Changes

Modified src/OFXMLParser.h from [fda97e43af] to [31713b74e0].

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#ifdef OF_HAVE_PROPERTIES
@property (retain) OFObject <OFXMLParserDelegate> *delegate;
#endif

/**
 * \return A new, autoreleased OFXMLParser
 */
+ xmlParser;

/**
 * \return The delegate that is used by the XML parser
 */
- (OFObject <OFXMLParserDelegate>*)delegate;

/**







|







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#ifdef OF_HAVE_PROPERTIES
@property (retain) OFObject <OFXMLParserDelegate> *delegate;
#endif

/**
 * \return A new, autoreleased OFXMLParser
 */
+ parser;

/**
 * \return The delegate that is used by the XML parser
 */
- (OFObject <OFXMLParserDelegate>*)delegate;

/**

Modified src/OFXMLParser.m from [b05b5824cd] to [6520243b50].

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
			return tmp;
	}

	return nil;
}

@implementation OFXMLParser
+ xmlParser
{
	return [[[self alloc] init] autorelease];
}

- init
{
	self = [super init];







|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
			return tmp;
	}

	return nil;
}

@implementation OFXMLParser
+ parser
{
	return [[[self alloc] init] autorelease];
}

- init
{
	self = [super init];

Modified tests/OFXMLParserTests.m from [5780bef1f6] to [e71bc53c5d].

318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
	    "   </foo:bla>\n"
	    "   <!-- commänt -->\n"
	    "  </qux>\n"
	    " </foobar>\n"
	    "</root>";
	size_t j, len;

	TEST(@"+[xmlParser]", (parser = [OFXMLParser xmlParser]))

	TEST(@"-[setDelegate:]", R([parser setDelegate: self]))

	/* Simulate a stream where we only get chunks */
	len = strlen(str);

	for (j = 0; j < len; j+= 2) {







|







318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
	    "   </foo:bla>\n"
	    "   <!-- commänt -->\n"
	    "  </qux>\n"
	    " </foobar>\n"
	    "</root>";
	size_t j, len;

	TEST(@"+[xmlParser]", (parser = [OFXMLParser parser]))

	TEST(@"-[setDelegate:]", R([parser setDelegate: self]))

	/* Simulate a stream where we only get chunks */
	len = strlen(str);

	for (j = 0; j < len; j+= 2) {