| 2676 | |
| 2677 | |
| 2678 | void XMLPrinter::OpenElement( const char* name, bool compactMode ) |
| 2679 | { |
| 2680 | SealElementIfJustOpened(); |
| 2681 | _stack.Push( name ); |
| 2682 | |
| 2683 | if ( _textDepth < 0 && !_firstElement && !compactMode ) { |
| 2684 | Putc( '\n' ); |
| 2685 | } |
| 2686 | if ( !compactMode ) { |
| 2687 | PrintSpace( _depth ); |
| 2688 | } |
| 2689 | |
| 2690 | Write ( "<" ); |
| 2691 | Write ( name ); |
| 2692 | |
| 2693 | _elementJustOpened = true; |
| 2694 | _firstElement = false; |
| 2695 | ++_depth; |
| 2696 | } |
| 2697 | |
| 2698 | |
| 2699 | void XMLPrinter::PushAttribute( const char* name, const char* value ) |