| 2548 | |
| 2549 | |
| 2550 | void XMLPrinter::OpenElement( const char* name, bool compactMode ) |
| 2551 | { |
| 2552 | SealElementIfJustOpened(); |
| 2553 | _stack.Push( name ); |
| 2554 | |
| 2555 | if ( _textDepth < 0 && !_firstElement && !compactMode ) { |
| 2556 | Putc( '\n' ); |
| 2557 | } |
| 2558 | if ( !compactMode ) { |
| 2559 | PrintSpace( _depth ); |
| 2560 | } |
| 2561 | |
| 2562 | Write ( "<" ); |
| 2563 | Write ( name ); |
| 2564 | |
| 2565 | _elementJustOpened = true; |
| 2566 | _firstElement = false; |
| 2567 | ++_depth; |
| 2568 | } |
| 2569 | |
| 2570 | |
| 2571 | void XMLPrinter::PushAttribute( const char* name, const char* value ) |