GLib.MarkupParseContext.get_element_stack

### Method

# GLib MarkupParseContextget_element_stack

since: 2.16

#### Declaration

    const GSList*
    g_markup_parse_context_get_element_stack (
      GMarkupParseContext* context
    )

#### Description

Retrieves the element stack from the internal state of the parser.

The returned `GSList` is a list of strings where the first item is the currently open tag (as would be returned by g_markup_parse_context_get_element()) and the next item is its immediate parent.

This function is intended to be used in the start_element and end_element handlers where `g_markup_parse_context_get_element()` would merely return the name of the element that is being processed.

Available since: 2.16

#### Return value

Type: A list of `utf8`

The element stack, which must not be modified.

The data is owned by the instance.
Each element is a NUL terminated UTF-8 string.