| 2057 | |
| 2058 | |
| 2059 | void XMLPrinter::CloseElement( bool compactMode ) |
| 2060 | { |
| 2061 | --_depth; |
| 2062 | const char* name = _stack.Pop(); |
| 2063 | |
| 2064 | if ( _elementJustOpened ) { |
| 2065 | Print( "/>" ); |
| 2066 | } |
| 2067 | else { |
| 2068 | if ( _textDepth < 0 && !compactMode) { |
| 2069 | Print( "\n" ); |
| 2070 | PrintSpace( _depth ); |
| 2071 | } |
| 2072 | Print( "</%s>", name ); |
| 2073 | } |
| 2074 | |
| 2075 | if ( _textDepth == _depth ) { |
| 2076 | _textDepth = -1; |
| 2077 | } |
| 2078 | if ( _depth == 0 && !compactMode) { |
| 2079 | Print( "\n" ); |
| 2080 | } |
| 2081 | _elementJustOpened = false; |
| 2082 | } |
| 2083 | |
| 2084 | |
| 2085 | void XMLPrinter::SealElement() |