Function in stdx_tml.h

tml_path_find_entry

Find an entry using a dot path.

X_TML_API TMLEntry const * tml_path_find_entry(
 TMLDocument const *doc,
 char const *path
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
char const *path
Dot-separated entry path.

Returns

Pointer to the matching entry, or NULL if the path does not resolve. The final path segment must refer to an entry name. Example: scene.objects.1.position

Function in stdx_tml.h

tml_path_find_node

Find a node using a dot path.

X_TML_API TMLNode const * tml_path_find_node(
 TMLDocument const *doc,
 char const *path
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
char const *path
Dot-separated node path.

Returns

Pointer to the matching node, or NULL if the path does not resolve. Path segments may refer to: - named child nodes - child node indices Example: scene.objects.1

Function in stdx_tml.h

tml_path_get_bool

Retrieve a boolean value using a dot path.

X_TML_API int tml_path_get_bool(
 TMLDocument const *doc,
 char const *path,
 u8 *out_value
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
char const *path
Dot-separated entry path.
u8 *out_value
Output boolean value.

Returns

Non-zero on success, 0 if the path does not resolve or the value is not a boolean.

Function in stdx_tml.h

tml_path_get_f64

Retrieve a double-precision floating point value using a dot path.

X_TML_API int tml_path_get_f64(
 TMLDocument const *doc,
 char const *path,
 f64 *out_value
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
char const *path
Dot-separated entry path.
f64 *out_value
Output floating point value.

Returns

Non-zero on success, 0 if the path does not resolve or the value is not a float.

Function in stdx_tml.h

tml_path_get_f64_array

Retrieve an f64 array using a dot path.

X_TML_API int tml_path_get_f64_array(
 TMLDocument const *doc,
 char const *path,
 TMLF64Slice *out_value
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
char const *path
Dot-separated entry path.
TMLF64Slice *out_value
Output array slice.

Returns

Non-zero on success, 0 if the path does not resolve or the value is not an f64 array.

Function in stdx_tml.h

tml_path_get_i64

Retrieve a signed 64-bit integer value using a dot path.

X_TML_API int tml_path_get_i64(
 TMLDocument const *doc,
 char const *path,
 i64 *out_value
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
char const *path
Dot-separated entry path.
i64 *out_value
Output integer value.

Returns

Non-zero on success, 0 if the path does not resolve or the value is not an integer.

Function in stdx_tml.h

tml_path_get_i64_array

Retrieve an i64 array using a dot path.

X_TML_API int tml_path_get_i64_array(
 TMLDocument const *doc,
 char const *path,
 TMLI64Slice *out_value
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
char const *path
Dot-separated entry path.
TMLI64Slice *out_value
Output array slice.

Returns

Non-zero on success, 0 if the path does not resolve or the value is not an i64 array.

Function in stdx_tml.h

tml_path_get_string

Retrieve a string value using a dot path.

X_TML_API int tml_path_get_string(
 TMLDocument const *doc,
 char const *path,
 TMLString *out_value
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
char const *path
Dot-separated entry path.
TMLString *out_value
Output string view.

Returns

Non-zero on success, 0 if the path does not resolve or the value is not a string.

Function in stdx_tml.h

tml_path_get_string_array

Retrieve a string array using a dot path.

X_TML_API int tml_path_get_string_array(
 TMLDocument const *doc,
 char const *path,
 TMLStringSlice *out_value
);

Parameters

TMLDocument const *doc
Pointer to the parsed document.
char const *path
Dot-separated entry path.
TMLStringSlice *out_value
Output array slice.

Returns

Non-zero on success, 0 if the path does not resolve or the value is not a string array.