Skip to main content

lyd_eval_xpath4

Function lyd_eval_xpath4 

Source
pub unsafe extern "C" fn lyd_eval_xpath4(
    ctx_node: *const lyd_node,
    tree: *const lyd_node,
    cur_mod: *const lys_module,
    xpath: *const c_char,
    format: Type,
    prefix_data: *mut c_void,
    vars: *const lyxp_var,
    ret_type: *mut Type,
    node_set: *mut *mut ly_set,
    string: *mut *mut c_char,
    number: *mut u128,
    boolean: *mut ly_bool,
) -> Type
Expand description

@brief Evaluate an XPath on data and return the result or convert it first to an expected result type.

Either all return type parameters @p node_set, @p string, @p number, and @p boolean with @p ret_type are provided or exactly one of @p node_set, @p string, @p number, and @p boolean is provided with @p ret_type being obvious and hence optional.

@param[in] ctx_node XPath context node, NULL for the root node. @param[in] tree Data tree to evaluate on. @param[in] cur_mod Current module of @p xpath, needed for some kinds of @p format. @param[in] xpath [XPath](@ref howtoXPath) to select. @param[in] format Format of any prefixes in @p xpath. @param[in] prefix_data Format-specific prefix data. @param[in] vars Optional [sized array](@ref sizedarrays) of XPath variables. @param[out] ret_type XPath type of the result selecting which of @p node_set, @p string, @p number, and @p boolean to use. @param[out] node_set XPath node set result. @param[out] string XPath string result. @param[out] number XPath number result. @param[out] boolean XPath boolean result. @return LY_SUCCESS on success. @return LY_ERR value on error.