Comment: | OFXMLElement: Remove defaultNamespace property |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
eed200181b72cc50f00a3dd51268f6fc |
User & Date: | js on 2022-09-04 13:17:27 |
Other Links: | manifest | tags |
2022-09-04
| ||
18:27 | Remove -[OFString stringByPrependingString:] check-in: 114576fe94 user: js tags: trunk | |
13:17 | OFXMLElement: Remove defaultNamespace property check-in: eed200181b user: js tags: trunk | |
2022-08-30
| ||
01:34 | OFStream: readTillDelimiter -> readUntilDelimiter check-in: 30492a6b61 user: js tags: trunk | |
Modified src/OFXMLAttribute.h from [facd4b4e2b] to [894be32117].
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 95 96 97 98 99 | - + | * @param name The name of the attribute * @param nameSpace The namespace of the attribute * @param stringValue The string value of the attribute * @return An initialized OFXMLAttribute with the specified parameters */ - (instancetype)initWithName: (OFString *)name namespace: (nullable OFString *)nameSpace |
Modified src/OFXMLAttribute.m from [f2a6cbc394] to [fef93ca0aa].
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | - + + - + - - - - - - + + + + + + + + + + + + + + + | } return self; } - (instancetype)initWithSerialization: (OFXMLElement *)element { |
︙ | |||
174 175 176 177 178 179 180 | 184 185 186 187 188 189 190 191 192 193 194 195 196 | - - - + + + + | objc_autoreleasePoolPop(pool); return [element autorelease]; } - (OFString *)description { |
Modified src/OFXMLCDATA.m from [53038bdcd2] to [268b8de778].
︙ | |||
112 113 114 115 116 117 118 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - - - - - - - - - - - | OFString *ret = [OFString stringWithFormat: @"<![CDATA[%@]]>", tmp]; [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } |
︙ |
Modified src/OFXMLCharacters.m from [9ea4b56013] to [53e16f06bf].
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | - - - - - - - - - - - - + | } - (OFString *)XMLString { return _characters.stringByXMLEscaping; } |
︙ |
Modified src/OFXMLComment.m from [842e736751] to [9e48182a96].
︙ | |||
101 102 103 104 105 106 107 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | } - (OFString *)XMLString { return [OFString stringWithFormat: @"<!--%@-->", _text]; } |
︙ |
Modified src/OFXMLElement.h from [76f1b54ce7] to [03aa33631b].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + | /** * @class OFXMLElement OFXMLElement.h ObjFW/OFXMLElement.h * * @brief A class which stores an XML element. */ @interface OFXMLElement: OFXMLNode { |
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - - - - - - | #ifndef __cplusplus @property OF_NULLABLE_PROPERTY (copy, nonatomic) OFString *namespace; #else @property OF_NULLABLE_PROPERTY (copy, nonatomic, getter=namespace, setter=setNamespace:) OFString *nameSpace; #endif |
︙ | |||
325 326 327 328 329 330 331 | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | - + | - (void)removeChild: (OFXMLNode *)child; /** * @brief Removes the child at the specified index. * * @param index The index of the child to remove */ |
︙ | |||
349 350 351 352 353 354 355 | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | - - + + - - + + | - (void)replaceChildAtIndex: (size_t)index withNode: (OFXMLNode *)node; /** * @brief Returns all children that have the specified namespace. * * @return All children that have the specified namespace */ |
︙ | |||
389 390 391 392 393 394 395 396 397 398 399 400 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | + + + + + + + + + + + + + + + + + + + + + + | * @param elementName The name of the elements * @param elementNS The namespace of the elements * @return The child elements with the specified name and namespace */ - (OFArray OF_GENERIC(OFXMLElement *) *) elementsForName: (OFString *)elementName namespace: (nullable OFString *)elementNS; /** * @brief Returns an OFString representing the OFXMLElement as an XML string * with the specified indentation per level. * * @param indentation The indentation per level * @return An OFString representing the OFXMLNode as an XML string with * indentation */ - (OFString *)XMLStringWithIndentation: (unsigned int)indentation; /** * @brief Returns an OFString representing the OFXMLElement as an XML string * with the specified default namespace and indentation per level. * * @param defaultNS The default namespace * @param indentation The indentation per level * @return An OFString representing the OFXMLNode as an XML string with * indentation */ - (OFString *)XMLStringWithDefaultNamespace: (OFString *)defaultNS indentation: (unsigned int)indentation; @end OF_ASSUME_NONNULL_END #import "OFXMLElement+Serialization.h" |
Modified src/OFXMLElement.m from [19e272e9d6] to [ada192cadd].
︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - | [super dealloc]; } @end @implementation OFXMLElement @synthesize name = _name, namespace = _namespace; |
︙ | |||
207 208 209 210 211 212 213 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | - - | @throw e; } self = [self initWithName: element->_name namespace: element->_namespace]; @try { |
︙ | |||
261 262 263 264 265 266 267 | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - - | @throw e; } self = [self initWithName: element->_name namespace: element->_namespace]; @try { |
︙ | |||
307 308 309 310 311 312 313 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | - - - - - | @try { OFXMLElement *attributesElement, *namespacesElement; OFXMLElement *childrenElement; OFEnumerator *keyEnumerator, *objectEnumerator; OFString *key, *object; |
︙ | |||
386 387 388 389 390 391 392 | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | - | return self; } - (void)dealloc { [_name release]; [_namespace release]; |
︙ | |||
443 444 445 446 447 448 449 | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | - - - - + + + + - + - - - - - - - - - - - - - - + - - + + - + + - - + + | } [ret makeImmutable]; return ret; } |
︙ | |||
601 602 603 604 605 606 607 | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | - - - - - - + + + + + + + - - - + + + + | unsigned int ind = (indent ? indentation : 0); if (ind) [tmp addItem: "\n"]; if ([child isKindOfClass: [OFXMLElement class]]) childString = [(OFXMLElement *)child |
︙ | |||
634 635 636 637 638 639 640 | 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | - + | if (indent) { memset(cString + i, ' ', level * indentation); i += level * indentation; } cString[i++] = '<'; cString[i++] = '/'; |
︙ | |||
664 665 666 667 668 669 670 | 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 | - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - - - | OFFreeMemory(cString); } return ret; } - (OFString *)XMLString { |
︙ | |||
854 855 856 857 858 859 860 | 829 830 831 832 833 834 835 836 837 838 839 840 841 842 | - - | } } - (void)setPrefix: (OFString *)prefix forNamespace: (OFString *)namespace { if (prefix.length == 0) @throw [OFInvalidArgumentException exception]; |
︙ | |||
1034 1035 1036 1037 1038 1039 1040 | 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 | - - - | element = object; if (element->_name != _name && ![element->_name isEqual: _name]) return false; if (element->_namespace != _namespace && ![element->_namespace isEqual: _namespace]) return false; |
︙ | |||
1058 1059 1060 1061 1062 1063 1064 | 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 | - - | { unsigned long hash; OFHashInit(&hash); OFHashAddHash(&hash, _name.hash); OFHashAddHash(&hash, _namespace.hash); |
Modified src/OFXMLNode.h from [202ae69295] to [7374215293].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - - - - - - - - - - - - - - - - - - - - - - | * @brief A string representing the node as an XML string. */ @property (readonly, nonatomic) OFString *XMLString; - (instancetype)init OF_UNAVAILABLE; - (instancetype)initWithSerialization: (OFXMLElement *)element OF_UNAVAILABLE; |
︙ |
Modified src/OFXMLNode.m from [b17a4348f8] to [ae31a5d0f3].
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - - - - - - - - - - - - + | - (double)doubleValue { return self.stringValue.doubleValue; } - (OFString *)XMLString { |
︙ |
Modified src/OFXMLParser.h from [30932bc605] to [beb6c0af85].
︙ | |||
48 49 50 51 52 53 54 | 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 73 74 75 76 77 78 79 80 81 82 83 | - + - + - + - + | /** * @brief This callback is called when the XML parser found the start of a new * tag. * * @param parser The parser which found a new tag * @param name The name of the tag which just started * @param prefix The prefix of the tag which just started or `nil` |
︙ |
Modified src/OFXMLParser.m from [ece1af7f25] to [7be6fc7234].
︙ | |||
110 111 112 113 114 115 116 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | - + | [stateInDOCTYPE] = inDOCTYPEState }; static OF_INLINE void appendToBuffer(OFMutableData *buffer, const char *string, OFStringEncoding encoding, size_t length) { |
︙ |
Modified src/OFXMLProcessingInstruction.m from [ca530a45f7] to [98f7922e9f].
︙ | |||
130 131 132 133 134 135 136 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | if (_text.length > 0) return [OFString stringWithFormat: @"<?%@ %@?>", _target, _text]; else return [OFString stringWithFormat: @"<?%@?>", _target]; } |
︙ |
Modified tests/serialization.xml from [d106910237] to [9c33dfe30d].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - - - - - - - - - - - - - - - - - - - | <key> <OFString>Blub</OFString> </key> <object> <OFString>B"la</OFString> </object> <key> |
︙ | |||
59 60 61 62 63 64 65 66 67 | 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 | + + + + + + + + + + + + + + + + + + + | </object> </OFCountedSet> </OFList> </key> <object> <OFString>list</OFString> </object> <key> <OFData>MDEyMzQ1Njc4OTo7PEFCQ0RFRkdISklLTE1OT1BRUlNUVVZXWFla</OFData> </key> <object> <OFString>data</OFString> </object> <key> <OFArray> <OFString>Qu"xbar test</OFString> <OFNumber type='signed'>1234</OFNumber> <OFNumber type='float'>40934a456d5cfaad</OFNumber> <OFMutableString>asd</OFMutableString> <OFDate>40934a456d5cfaad</OFDate> </OFArray> </key> <object> <OFString>Hello</OFString> </object> </OFMutableDictionary> </serialization> |