Differences From Artifact [8558828739]:
- File
src/OFXMLElement.m
— part of check-in
[0ec6f9c1d9]
at
2018-06-16 14:36:35
on branch trunk
— OFXML*: Remember delimiter of attributes
This means that if OFXMLParser parsed double-quoted attributes,
OFXMLElement will emit them with double-quotes again. (user: js, size: 26596) [annotate] [blame] [check-ins using]
To Artifact [cd5a521542]:
- File src/OFXMLElement.m — part of check-in [b090b5ce92] at 2018-11-17 22:59:10 on branch trunk — Various minor style improvements (user: js, size: 26634) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
283 284 285 286 287 288 289 | self = [super of_init]; @try { void *pool = objc_autoreleasePoolPush(); OFXMLElement *attributesElement, *namespacesElement; OFXMLElement *childrenElement; OFEnumerator *keyEnumerator, *objectEnumerator; | | | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | self = [super of_init]; @try { void *pool = objc_autoreleasePoolPush(); OFXMLElement *attributesElement, *namespacesElement; OFXMLElement *childrenElement; OFEnumerator *keyEnumerator, *objectEnumerator; OFString *key, *object; if (![[element name] isEqual: [self className]] || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException exception]; _name = [[[element attributeForName: @"name"] stringValue] copy]; |
︙ | ︙ | |||
324 325 326 327 328 329 330 | if ((_attributes != nil && ![_attributes isKindOfClass: [OFMutableArray class]]) || (_namespaces != nil && ![_namespaces isKindOfClass: [OFMutableDictionary class]]) || (_children != nil && ![_children isKindOfClass: [OFMutableArray class]])) @throw [OFInvalidArgumentException exception]; | | | | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | if ((_attributes != nil && ![_attributes isKindOfClass: [OFMutableArray class]]) || (_namespaces != nil && ![_namespaces isKindOfClass: [OFMutableDictionary class]]) || (_children != nil && ![_children isKindOfClass: [OFMutableArray class]])) @throw [OFInvalidArgumentException exception]; for (OFXMLAttribute *attribute in _attributes) if (![attribute isKindOfClass: [OFXMLAttribute class]]) @throw [OFInvalidArgumentException exception]; keyEnumerator = [_namespaces keyEnumerator]; objectEnumerator = [_namespaces objectEnumerator]; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) if (![key isKindOfClass: [OFString class]] || |
︙ | ︙ | |||
445 446 447 448 449 450 451 | ? parent->_namespace : (OFString *)@"")]; /* Add the namespaces of the current element */ if (allNamespaces != nil) { OFEnumerator *keyEnumerator = [_namespaces keyEnumerator]; OFEnumerator *objectEnumerator = [_namespaces objectEnumerator]; OFMutableDictionary *tmp; | | | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | ? parent->_namespace : (OFString *)@"")]; /* Add the namespaces of the current element */ if (allNamespaces != nil) { OFEnumerator *keyEnumerator = [_namespaces keyEnumerator]; OFEnumerator *objectEnumerator = [_namespaces objectEnumerator]; OFMutableDictionary *tmp; OFString *key, *object; tmp = [[allNamespaces mutableCopy] autorelease]; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) [tmp setObject: object forKey: key]; |
︙ | ︙ |