Skip to main content

lyd_find_xpath3

Function lyd_find_xpath3 

Source
pub unsafe extern "C" fn lyd_find_xpath3(
    ctx_node: *const lyd_node,
    tree: *const lyd_node,
    xpath: *const c_char,
    format: Type,
    prefix_data: *mut c_void,
    vars: *const lyxp_var,
    set: *mut *mut ly_set,
) -> Type
Expand description

@brief Search in the given data for instances of nodes matching the provided XPath.

It is ::lyd_find_xpath2() with @p tree added so that @p ctx_node may be the root and also @p format and @p prefix_data added for expressions in different formats than JSON.

@param[in] ctx_node XPath context node, NULL for the root node. @param[in] tree Data tree to evaluate on. @param[in] xpath [XPath](@ref howtoXPath) to select with prefixes in @p format. @param[in] format Format of any prefixes in @p xpath. @param[in] prefix_data Format-specific prefix data. @param[in] vars [Sized array](@ref sizedarrays) of XPath variables. @param[out] set Set of found data nodes. In case the result is a number, a string, or a boolean, the returned set is empty. @return LY_SUCCESS on success, @p set is returned. @return LY_ERR value if an error occurred.