Count the number of child in a node with mxml November 25, 2008 05:45AM | Registered: 15 years ago Posts: 175 |
unsigned int ChildCount(mxml_node_t *Up_Node, const char *Name) { int Count = 0; if(Up_Node) { mxml_node_t *Message_Node = NULL; for(Message_Node = mxmlFindElement(Up_Node, Up_Node, Name, NULL, NULL, MXML_DESCEND); Message_Node != NULL; Message_Node = mxmlFindElement(Message_Node, Up_Node, Name, NULL, NULL, MXML_DESCEND)) { Count++; } } return Count; }