nodeset.h
Name
nodeset.h -- The enchanced nodes set imlmentation.
Synopsis
enum xmlSecNodeSetType;
enum xmlSecNodeSetOp;
struct xmlSecNodeSet;
int (*xmlSecNodeSetWalkCallback) (xmlSecNodeSetPtr nset,
xmlNodePtr cur,
xmlNodePtr parent,
void *data);
xmlSecNodeSetPtr xmlSecNodeSetCreate (xmlDocPtr doc,
xmlNodeSetPtr nodes,
xmlSecNodeSetType type);
void xmlSecNodeSetDestroy (xmlSecNodeSetPtr nset);
int xmlSecNodeSetContains (xmlSecNodeSetPtr nset,
xmlNodePtr node,
xmlNodePtr parent);
xmlSecNodeSetPtr xmlSecNodeSetAdd (xmlSecNodeSetPtr nset,
xmlSecNodeSetPtr newNSet,
xmlSecNodeSetOp op);
xmlSecNodeSetPtr xmlSecNodeSetAddList (xmlSecNodeSetPtr nset,
xmlSecNodeSetPtr newNSet,
xmlSecNodeSetOp op);
xmlSecNodeSetPtr xmlSecNodeSetGetChildren (xmlDocPtr doc,
const xmlNodePtr parent,
int withComments,
int invert);
int xmlSecNodeSetWalk (xmlSecNodeSetPtr nset,
xmlSecNodeSetWalkCallback walkFunc,
void *data);
void xmlSecNodeSetDebugDump (xmlSecNodeSetPtr nset,
FILE *output); |
Details
enum xmlSecNodeSetType
typedef enum {
xmlSecNodeSetNormal = 0,
xmlSecNodeSetInvert,
xmlSecNodeSetTree,
xmlSecNodeSetTreeWithoutComments,
xmlSecNodeSetTreeInvert,
xmlSecNodeSetTreeWithoutCommentsInvert,
xmlSecNodeSetList
} xmlSecNodeSetType; |
The simple nodes sets types.
enum xmlSecNodeSetOp
typedef enum {
xmlSecNodeSetIntersection = 0,
xmlSecNodeSetSubtraction,
xmlSecNodeSetUnion
} xmlSecNodeSetOp; |
The simple nodes sets operations.
struct xmlSecNodeSet
struct xmlSecNodeSet {
xmlNodeSetPtr nodes;
xmlDocPtr doc;
xmlSecNodeSetType type;
xmlSecNodeSetOp op;
xmlSecNodeSetPtr next;
xmlSecNodeSetPtr prev;
xmlSecNodeSetPtr children;
}; |
The enchanced nodes set.
xmlSecNodeSetWalkCallback ()
int (*xmlSecNodeSetWalkCallback) (xmlSecNodeSetPtr nset,
xmlNodePtr cur,
xmlNodePtr parent,
void *data); |
The callback function called once per each node in the nodes set.
xmlSecNodeSetCreate ()
xmlSecNodeSetPtr xmlSecNodeSetCreate (xmlDocPtr doc,
xmlNodeSetPtr nodes,
xmlSecNodeSetType type); |
Creates new nodes set.
xmlSecNodeSetDestroy ()
void xmlSecNodeSetDestroy (xmlSecNodeSetPtr nset); |
Destroys the nodes set.
xmlSecNodeSetContains ()
int xmlSecNodeSetContains (xmlSecNodeSetPtr nset,
xmlNodePtr node,
xmlNodePtr parent); |
Checks whether the node is in the nodes set or not.
xmlSecNodeSetAdd ()
xmlSecNodeSetPtr xmlSecNodeSetAdd (xmlSecNodeSetPtr nset,
xmlSecNodeSetPtr newNSet,
xmlSecNodeSetOp op); |
Adds newNSet to the nset using operation op.
xmlSecNodeSetAddList ()
xmlSecNodeSetPtr xmlSecNodeSetAddList (xmlSecNodeSetPtr nset,
xmlSecNodeSetPtr newNSet,
xmlSecNodeSetOp op); |
Adds newNSet to the nset as child using operation op.
xmlSecNodeSetGetChildren ()
xmlSecNodeSetPtr xmlSecNodeSetGetChildren (xmlDocPtr doc,
const xmlNodePtr parent,
int withComments,
int invert); |
Creates a new nodes set that contains:
- if withComments is not 0 and invert is 0:
all nodes in the parent subtree;
- if withComments is 0 and invert is 0:
all nodes in the parent subtree except comment nodes;
- if withComments is not 0 and invert not is 0:
all nodes in the doc except nodes in the parent subtree;
- if withComments is 0 and invert is 0:
all nodes in the doc except nodes in the parent subtree
and comment nodes.
xmlSecNodeSetWalk ()
Calls the function walkFunc once per each node in the nodes set nset.
If the walkFunc returns a negative value, then the walk procedure
is interrupted.
xmlSecNodeSetDebugDump ()
void xmlSecNodeSetDebugDump (xmlSecNodeSetPtr nset,
FILE *output); |
Prints information about nset to the output.