Xmlb.NodeChildIter

Fields

Name

Type

Access

Description

dummy1

object

r

dummy2

object

r

dummy3

bool

r

dummy4

object

r

dummy5

object

r

dummy6

object

r

Methods

init (self)

next ()

Details

class Xmlb.NodeChildIter

A Xmlb.NodeChildIter structure represents an iterator that can be used to iterate over the children of a Xmlb.Node. Xmlb.NodeChildIter structures are typically allocated on the stack and then initialized with Xmlb.NodeChildIter.init().

New in version 0.3.4.

init(self)
Parameters:

self (Xmlb.Node) – a Xmlb.Node

Initializes a child iterator for the node’s children and associates it with self. The Xmlb.NodeChildIter structure is typically allocated on the stack and does not need to be freed explicitly.

New in version 0.3.4.

next()
Returns:

False if the last child has been reached.

child:

Destination of the returned child

Return type:

(bool, child: Xmlb.Node)

Returns the current child and advances the iterator. The retrieved Xmlb.Node child needs to be dereferenced with GObject.Object.unref(). Example:

XbNodeChildIter iter;
g_autoptr(XbNode) child = NULL;

xb_node_child_iter_init (&iter, node);
while (xb_node_child_iter_next (&iter, &child)) {
    // do something with the node child
    g_clear_pointer (&child, g_object_unref);
}

New in version 0.3.4.