TMLNode
typedef struct TMLNode{
TMLString name;
u32 parent;
u32 next_sibling;
u32 first_child;
u32 last_child;
u32 child_count;
u32 first_entry;
u32 last_entry;
u32 entry_count;
}TMLNode;
typedef struct TMLNode{
TMLString name;
u32 parent;
u32 next_sibling;
u32 first_child;
u32 last_child;
u32 child_count;
u32 first_entry;
u32 last_entry;
u32 entry_count;
}TMLNode;
Retrieve a node by global node index.
X_TML_API TMLNode const * tml_node_at(
TMLDocument const *doc,
u32 index
);
TMLDocument const *docu32 indexPointer to the node, or NULL if the index is invalid. Nodes are stored sequentially in document order.
Retrieve a direct child node by index.
X_TML_API TMLNode const * tml_node_child_at(
TMLDocument const *doc,
TMLNode const *node,
u32 index
);
TMLDocument const *docTMLNode const *nodeu32 indexPointer to the child node, or NULL if the index is invalid. Child indices are stable and include both named and anonymous nodes.
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
);
TMLDocument const *docTMLNode const *nodeu32 indexPointer to the entry, or NULL if the index is invalid.
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
);
TMLDocument const *docTMLNode const *nodechar const *namePointer to the matching child node, or NULL if no child matches.
Find a direct entry by name.
X_TML_API TMLEntry const * tml_node_find_entry(
TMLDocument const *doc,
TMLNode const *node,
char const *name
);
TMLDocument const *docTMLNode const *nodechar const *namePointer to the matching entry, or NULL if no entry matches.
Retrieve a root node by index.
X_TML_API TMLNode const * tml_root_node_at(
TMLDocument const *doc,
u32 index
);
TMLDocument const *docu32 indexPointer to the root node, or NULL if the index is invalid.