| 1939 | |
| 1940 | |
| 1941 | void XMLPrinter::OpenElement( const char* name, bool compactMode ) { |
| 1942 | SealElementIfJustOpened(); |
| 1943 | _stack.Push( name ); |
| 1944 | |
| 1945 | if ( _textDepth < 0 && !_firstElement && !compactMode ) { |
| 1946 | Print( "\n" ); |
| 1947 | } |
| 1948 | if ( !compactMode ) { |
| 1949 | PrintSpace( _depth ); |
| 1950 | } |
| 1951 | |
| 1952 | Print( "<%s", name ); |
| 1953 | _elementJustOpened = true; |
| 1954 | _firstElement = false; |
| 1955 | ++_depth; |
| 1956 | } |
| 1957 | |
| 1958 | |
| 1959 | void XMLPrinter::PushAttribute( const char* name, const char* value ) { |