2.1.26.31 tree_filter_by_attrib_match


Description

filter tree by attribute matching

Syntax

bool tree_filter_by_attrib_match( TreeNode & tr, int iUnitNodeID, LPCSTR lpcstrAttrib, LPCSTR lpcstrPattern, bool bCaseSensitive = false )

Parameters

tr
[modify]input and output tree
iUnitNodeID
[input] the unit node DataID to be matched
lpcstrAttrib
[input] attribute name
lpcstrPattern
[input] matching pattern
bCaseSensitive
[input] true , case sensitive,and false , not

Return

Returns true on success, false if failure

Examples

EX1

#include <GetNBox.h>
#define ID_FB_FUNCTION 1010
//this function filter tree node label beginning with "ocmath_" out
void    tree_filter_by_attrib_match_ex1()
{
    Tree    tr("c:\\sample.xml");
    tree_filter_by_attrib_match(tr, ID_FB_FUNCTION, STR_LABEL_ATTRIB, "ocmath_*");
}

Remark

See Also

tree_filter_by_attrib_find

Header to Include

origin.h

Reference