Function in stdx_tml.h

tml_node_at

Retrieve a node by global node index.

X_TML_API TMLNode const * tml_node_at(
 TMLDocument const *doc,
 u32 index
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
u32 index
Zero-based global node index.

Returns

Pointer to the node, or NULL if the index is invalid. Nodes are stored sequentially in document order.

Function in stdx_tml.h

tml_node_child_at

Retrieve a direct child node by index.

X_TML_API TMLNode const * tml_node_child_at(
 TMLDocument const *doc,
 TMLNode const *node,
 u32 index
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
TMLNode const *node
Pointer to the parent node.
u32 index
Zero-based child node index.

Returns

Pointer to the child node, or NULL if the index is invalid. Child indices are stable and include both named and anonymous nodes.

Function in stdx_tml.h

tml_node_entry_at

Retrieve a direct entry from a node by index.

X_TML_API TMLEntry const * tml_node_entry_at(
 TMLDocument const *doc,
 TMLNode const *node,
 u32 index
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
TMLNode const *node
Pointer to the parent node.
u32 index
Zero-based entry index.

Returns

Pointer to the entry, or NULL if the index is invalid.

Function in stdx_tml.h

tml_node_find_child

Find a direct child node by name.

X_TML_API TMLNode const * tml_node_find_child(
 TMLDocument const *doc,
 TMLNode const *node,
 char const *name
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
TMLNode const *node
Pointer to the parent node.
char const *name
Child node name.

Returns

Pointer to the matching child node, or NULL if no child matches.

Function in stdx_tml.h

tml_node_find_entry

Find a direct entry by name.

X_TML_API TMLEntry const * tml_node_find_entry(
 TMLDocument const *doc,
 TMLNode const *node,
 char const *name
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
TMLNode const *node
Pointer to the parent node.
char const *name
Entry name.

Returns

Pointer to the matching entry, or NULL if no entry matches.

Function in stdx_tml.h

tml_root_node_at

Retrieve a root node by index.

X_TML_API TMLNode const * tml_root_node_at(
 TMLDocument const *doc,
 u32 index
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
u32 index
Zero-based root node index.

Returns

Pointer to the root node, or NULL if the index is invalid.