Contents Previous Next

mxmlFindElement()

Description

Find the named element.

The search is constrained by the name, attribute name, and value; any NULL names or values are treated as wildcards, so different kinds of searches can be implemented by looking for all elements of a given name or all elements with a specific attribute. The descend argument determines whether the search descends into child nodes; normally you will use MXML_DESCEND_FIRST for the initial search and MXML_NO_DESCEND to find additional direct descendents of the node. The top node argument constrains the search to a particular node's children.

Syntax

mxml_node_t *
mxmlFindElement( mxml_node_t * node, mxml_node_t * top, const char * name, const char * attr, const char * value, int descend);

Arguments

NameDescription
nodeCurrent node
topTop node
nameElement name or NULL for any
attrAttribute name, or NULL for none
valueAttribute value, or NULL for any
descendDescend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST

Returns

Element node or NULL


Contents Previous Next