| 428 | } |
| 429 | |
| 430 | int |
| 431 | XmlFileStream::endTag() |
| 432 | { |
| 433 | // if (sendSelfCount == 0) { |
| 434 | if (numTag != 0) { |
| 435 | if (attributeMode == true) { |
| 436 | theFile << "/>\n"; |
| 437 | delete [] tags[numTag-1]; |
| 438 | tags[numTag-1] = nullptr; |
| 439 | numTag--; |
| 440 | } else { |
| 441 | this->indent(); |
| 442 | theFile << "</" << tags[numTag-1] << ">\n"; |
| 443 | delete [] tags[numTag-1]; |
| 444 | tags[numTag-1] = nullptr; |
| 445 | numTag--; |
| 446 | } |
| 447 | |
| 448 | attributeMode = false; |
| 449 | numIndent--; |
| 450 | |
| 451 | if (sendSelfCount != 0) |
| 452 | (*xmlColumns)[numXMLTags] += 1; |
| 453 | |
| 454 | if (numIndent == -1) |
| 455 | numXMLTags++; |
| 456 | |
| 457 | return 0; |
| 458 | } |
| 459 | |
| 460 | /* } else { |
| 461 | |
| 462 | if (numTag != 0) { |
| 463 | if (attributeMode == true) { |
| 464 | int nextXmlStringLength = xmlStringLength + 4; |
| 465 | char *nextXmlString = new char [nextXmlStringLength]; |
| 466 | nextXmlString[0]='\0'; |
| 467 | if (xmlString != 0) { |
| 468 | strncpy(nextXmlString, xmlString, xmlStringLength); |
| 469 | delete [] xmlString; |
| 470 | } |
| 471 | |
| 472 | xmlString = nextXmlString; |
| 473 | xmlStringLength = nextXmlStringLength; |
| 474 | |
| 475 | strcat(xmlString,"/>\n"); |
| 476 | delete [] tags[numTag-1]; |
| 477 | tags[numTag-1] = nullptr; |
| 478 | numTag--; |
| 479 | |
| 480 | } else { |
| 481 | |
| 482 | int nextXmlStringLength = xmlStringLength + numIndent*indentSize + strlen(tags[numTag-1]) + 5; |
| 483 | char *nextXmlString = new char [nextXmlStringLength]; |
| 484 | |
| 485 | |
| 486 | if (xmlString != 0) { |
| 487 | strncpy(nextXmlString, xmlString, xmlStringLength); |