| 2571 | |
| 2572 | |
| 2573 | void XMLPrinter::CloseElement( bool compactMode ) |
| 2574 | { |
| 2575 | --_depth; |
| 2576 | const char* name = _stack.Pop(); |
| 2577 | |
| 2578 | if ( _elementJustOpened ) { |
| 2579 | Print( "/>" ); |
| 2580 | } |
| 2581 | else { |
| 2582 | if ( _textDepth < 0 && !compactMode) { |
| 2583 | Print( "\n" ); |
| 2584 | PrintSpace( _depth ); |
| 2585 | } |
| 2586 | Print( "</%s>", name ); |
| 2587 | } |
| 2588 | |
| 2589 | if ( _textDepth == _depth ) { |
| 2590 | _textDepth = -1; |
| 2591 | } |
| 2592 | if ( _depth == 0 && !compactMode) { |
| 2593 | Print( "\n" ); |
| 2594 | } |
| 2595 | _elementJustOpened = false; |
| 2596 | } |
| 2597 | |
| 2598 | |
| 2599 | void XMLPrinter::SealElementIfJustOpened() |