| 2556 | |
| 2557 | |
| 2558 | void XMLPrinter::OpenElement( const char* name, bool compactMode ) |
| 2559 | { |
| 2560 | SealElementIfJustOpened(); |
| 2561 | _stack.Push( name ); |
| 2562 | |
| 2563 | if ( _textDepth < 0 && !_firstElement && !compactMode ) { |
| 2564 | Putc( '\n' ); |
| 2565 | } |
| 2566 | if ( !compactMode ) { |
| 2567 | PrintSpace( _depth ); |
| 2568 | } |
| 2569 | |
| 2570 | Write ( "<" ); |
| 2571 | Write ( name ); |
| 2572 | |
| 2573 | _elementJustOpened = true; |
| 2574 | _firstElement = false; |
| 2575 | ++_depth; |
| 2576 | } |
| 2577 | |
| 2578 | |
| 2579 | void XMLPrinter::PushAttribute( const char* name, const char* value ) |