141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
namespaces = [[OFMutableArray alloc] init];
pool = [[OFAutoreleasePool alloc] init];
dict = [OFMutableDictionary dictionaryWithKeysAndObjects:
@"xml", @"http://www.w3.org/XML/1998/namespace",
@"xmlns", @"http://www.w3.org/2000/xmlns/", nil];
[namespaces addObject: dict];
[pool release];
} @catch (id e) {
[self release];
@throw e;
}
return self;
|
>
>
>
|
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
namespaces = [[OFMutableArray alloc] init];
pool = [[OFAutoreleasePool alloc] init];
dict = [OFMutableDictionary dictionaryWithKeysAndObjects:
@"xml", @"http://www.w3.org/XML/1998/namespace",
@"xmlns", @"http://www.w3.org/2000/xmlns/", nil];
[namespaces addObject: dict];
lineNumber = 1;
[pool release];
} @catch (id e) {
[self release];
@throw e;
}
return self;
|
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
buf[i] != '\n' && buf[i] != '\r')
@throw [OFMalformedXMLException
newWithClass: isa];
return;
}
for (i = 0; i < size; i++)
lookup_table[state](self, selectors[state], buf, &i, &last);
/* In OF_XMLPARSER_IN_TAG, there can be only spaces */
if (size - last > 0 && state != OF_XMLPARSER_IN_TAG)
[cache appendCStringWithoutUTF8Checking: buf + last
length: size - last];
}
|
|
>
>
>
>
>
>
>
>
>
>
>
>
|
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
buf[i] != '\n' && buf[i] != '\r')
@throw [OFMalformedXMLException
newWithClass: isa];
return;
}
for (i = 0; i < size; i++) {
size_t j = i;
lookup_table[state](self, selectors[state], buf, &i, &last);
/* Ensure we don't count this character twice */
if (i != j)
continue;
if (buf[i] == '\r' || (buf[i] == '\n' && !lastCarriageReturn))
lineNumber++;
lastCarriageReturn = (buf[i] == '\r' ? YES : NO);
}
/* In OF_XMLPARSER_IN_TAG, there can be only spaces */
if (size - last > 0 && state != OF_XMLPARSER_IN_TAG)
[cache appendCStringWithoutUTF8Checking: buf + last
length: size - last];
}
|
888
889
890
891
892
893
894
895
896
897
898
899
900
901
|
state = OF_XMLPARSER_OUTSIDE_TAG;
else
level--;
}
*last = *i + 1;
}
- (BOOL)finishedParsing
{
return finishedParsing;
}
- (OFString*)string: (OFString*)string
|
>
>
>
>
>
|
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
|
state = OF_XMLPARSER_OUTSIDE_TAG;
else
level--;
}
*last = *i + 1;
}
- (size_t)lineNumber
{
return lineNumber;
}
- (BOOL)finishedParsing
{
return finishedParsing;
}
- (OFString*)string: (OFString*)string
|