MCPcopy Create free account
hub / github.com/JayXon/Leanify / CloseElement

Method CloseElement

lib/tinyxml2/tinyxml2.cpp:2160–2183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2158
2159
2160void XMLPrinter::CloseElement( bool compactMode )
2161{
2162 --_depth;
2163 const char* name = _stack.Pop();
2164
2165 if ( _elementJustOpened ) {
2166 Print( "/>" );
2167 }
2168 else {
2169 if ( _textDepth < 0 && !compactMode) {
2170 Print( "\n" );
2171 PrintSpace( _depth );
2172 }
2173 Print( "</%s>", name );
2174 }
2175
2176 if ( _textDepth == _depth ) {
2177 _textDepth = -1;
2178 }
2179 if ( _depth == 0 && !compactMode) {
2180 Print( "\n" );
2181 }
2182 _elementJustOpened = false;
2183}
2184
2185
2186void XMLPrinter::SealElementIfJustOpened()

Callers

nothing calls this directly

Calls 1

PopMethod · 0.80

Tested by

no test coverage detected