• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/mxml-2.7/

Lines Matching refs:node

21  *   mxmlWalkNext()    - Walk to the next logical node in the tree.
22 * mxmlWalkPrev() - Walk to the previous logical node in the tree.
42 * additional direct descendents of the node. The top node argument
43 * constrains the search to a particular node's children.
46 mxml_node_t * /* O - Element node or NULL */
47 mxmlFindElement(mxml_node_t *node, /* I - Current node */
48 mxml_node_t *top, /* I - Top node */
61 if (!node || !top || (!attr && value))
65 * Start with the next node...
68 node = mxmlWalkNext(node, top, descend);
74 while (node != NULL)
77 * See if this node matches...
80 if (node->type == MXML_ELEMENT &&
81 node->value.element.name &&
82 (!name || !strcmp(node->value.element.name, name)))
89 return (node); /* No attribute search, return it... */
95 if ((temp = mxmlElementGetAttr(node, attr)) != NULL)
102 return (node); /* Yes, return it... */
107 * No match, move on to the next node...
111 node = mxmlWalkNext(node, top, MXML_DESCEND);
113 node = node->next;
121 * 'mxmlFindPath()' - Find a node with the given path.
127 * The first child node of the found node is returned if the given node has
128 * children and the first child is a value node.
133 mxml_node_t * /* O - Found node or NULL */
134 mxmlFindPath(mxml_node_t *top, /* I - Top node */
137 mxml_node_t *node; /* Current node */
154 node = top;
191 if ((node = mxmlFindElement(node, node, element, NULL, NULL,
197 * If we get this far, return the node or its first child...
200 if (node->child && node->child->type != MXML_ELEMENT)
201 return (node->child);
203 return (node);
208 * 'mxmlWalkNext()' - Walk to the next logical node in the tree.
211 * to be the next node. The top node argument constrains the walk to
212 * the node's children.
215 mxml_node_t * /* O - Next node or NULL */
216 mxmlWalkNext(mxml_node_t *node, /* I - Current node */
217 mxml_node_t *top, /* I - Top node */
220 if (!node)
222 else if (node->child && descend)
223 return (node->child);
224 else if (node == top)
226 else if (node->next)
227 return (node->next);
228 else if (node->parent && node->parent != top)
230 node = node->parent;
232 while (!node->next)
233 if (node->parent == top || !node->parent)
236 node = node->parent;
238 return (node->next);
246 * 'mxmlWalkPrev()' - Walk to the previous logical node in the tree.
248 * The descend argument controls whether the previous node's last child
249 * is considered to be the previous node. The top node argument constrains
250 * the walk to the node's children.
253 mxml_node_t * /* O - Previous node or NULL */
254 mxmlWalkPrev(mxml_node_t *node, /* I - Current node */
255 mxml_node_t *top, /* I - Top node */
258 if (!node || node == top)
260 else if (node->prev)
262 if (node->prev->last_child && descend)
265 * Find the last child under the previous node...
268 node = node->prev->last_child;
270 while (node->last_child)
271 node = node->last_child;
273 return (node);
276 return (node->prev);
278 else if (node->parent != top)
279 return (node->parent);