Function OpenElement

Synopsis

#include <tinyxml2.h>

void OpenElement(const char *name, bool compactMode=false)

Description

If streaming, start writing an element. The element must be closed with CloseElement()

Mentioned in

Source

Lines 2680-2690 in tinyxml2.cpp. Line 2254 in tinyxml2.h.

void XMLPrinter::OpenElement( const char* name, bool compactMode )
{
    PrepareForNewNode( compactMode );
    _stack.Push( name );

    Write ( "<" );
    Write ( name );

    _elementJustOpened = true;
    ++_depth;
}





Add Discussion as Guest

Log in