| 1995 | |
| 1996 | |
| 1997 | void XMLPrinter::OpenElement( const char* name, bool compactMode ) |
| 1998 | { |
| 1999 | if ( _elementJustOpened ) { |
| 2000 | SealElement(); |
| 2001 | } |
| 2002 | _stack.Push( name ); |
| 2003 | |
| 2004 | if ( _textDepth < 0 && !_firstElement && !compactMode ) { |
| 2005 | Print( "\n" ); |
| 2006 | } |
| 2007 | if ( !compactMode ) { |
| 2008 | PrintSpace( _depth ); |
| 2009 | } |
| 2010 | |
| 2011 | Print( "<%s", name ); |
| 2012 | _elementJustOpened = true; |
| 2013 | _firstElement = false; |
| 2014 | ++_depth; |
| 2015 | } |
| 2016 | |
| 2017 | |
| 2018 | void XMLPrinter::PushAttribute( const char* name, const char* value ) |