210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
- initWithXMLString: (OFString*)str
{
OFAutoreleasePool *pool;
OFXMLParser *parser;
OFXMLElementBuilder *builder;
OFXMLElement_OFXMLElementBuilderDelegate *delegate;
[self release];
pool = [[OFAutoreleasePool alloc] init];
parser = [OFXMLParser parser];
builder = [OFXMLElementBuilder elementBuilder];
delegate = [[[OFXMLElement_OFXMLElementBuilderDelegate alloc] init]
autorelease];
[parser setDelegate: builder];
[builder setDelegate: delegate];
[parser parseString: str];
if (![parser finishedParsing])
@throw [OFMalformedXMLException newWithClass: isa
parser: parser];
self = [delegate->element retain];
@try {
[pool release];
} @catch (id e) {
|
>
>
|
|
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
|
- initWithXMLString: (OFString*)str
{
OFAutoreleasePool *pool;
OFXMLParser *parser;
OFXMLElementBuilder *builder;
OFXMLElement_OFXMLElementBuilderDelegate *delegate;
Class c;
c = isa;
[self release];
pool = [[OFAutoreleasePool alloc] init];
parser = [OFXMLParser parser];
builder = [OFXMLElementBuilder elementBuilder];
delegate = [[[OFXMLElement_OFXMLElementBuilderDelegate alloc] init]
autorelease];
[parser setDelegate: builder];
[builder setDelegate: delegate];
[parser parseString: str];
if (![parser finishedParsing])
@throw [OFMalformedXMLException newWithClass: c
parser: parser];
self = [delegate->element retain];
@try {
[pool release];
} @catch (id e) {
|