526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
|
else
defaultNS = defaultNamespace;
i = 0;
length = [name cStringLength] + 3 + (level * indentation);
cString = [self allocMemoryWithSize: length];
for (j = 0; j < level * indentation; j++)
cString[i++] = ' ';
/* Start of tag */
cString[i++] = '<';
if (prefix != nil && ![ns isEqual: defaultNS]) {
length += [prefix cStringLength] + 1;
@try {
|
>
|
<
|
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
|
else
defaultNS = defaultNamespace;
i = 0;
length = [name cStringLength] + 3 + (level * indentation);
cString = [self allocMemoryWithSize: length];
memset(cString + i, ' ', level * indentation);
i += level * indentation;
/* Start of tag */
cString[i++] = '<';
if (prefix != nil && ![ns isEqual: defaultNS]) {
length += [prefix cStringLength] + 1;
@try {
|
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
|
}
cString[i++] = '>';
memcpy(cString + i, [tmp cString], [tmp cStringLength]);
i += [tmp cStringLength];
if (indent)
for (j = 0; j < level * indentation; j++)
cString[i++] = ' ';
cString[i++] = '<';
cString[i++] = '/';
if (prefix != nil) {
length += [prefix cStringLength] + 1;
@try {
cString = [self resizeMemory: cString
|
|
>
|
<
>
|
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
|
}
cString[i++] = '>';
memcpy(cString + i, [tmp cString], [tmp cStringLength]);
i += [tmp cStringLength];
if (indent) {
memset(cString + i, ' ', level * indentation);
i += level * indentation;
}
cString[i++] = '<';
cString[i++] = '/';
if (prefix != nil) {
length += [prefix cStringLength] + 1;
@try {
cString = [self resizeMemory: cString
|