<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Count the number of child in a node with mxml</title>
<description> Hi, I want to count the number of child within a node with mxml. I guess there must be a function for that, but since I don&amp;#039;t know it I use my own. So if you know something faster, please let know.

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;
}

I found nothing on the Web site: [www.minixml.org]

Thanks,

Crayon</description><link>http://forum.wiibrew.org/read.php?11,4169,4169#msg-4169</link><lastBuildDate>Sun, 07 Jun 2026 16:44:09 +0200</lastBuildDate>
<generator>Phorum 5.2.23</generator>
<item>
<guid>http://forum.wiibrew.org/read.php?11,4169,4169#msg-4169</guid>
<title>Count the number of child in a node with mxml</title><link>http://forum.wiibrew.org/read.php?11,4169,4169#msg-4169</link><description><![CDATA[ Hi, I want to count the number of child within a node with <b>mxml</b>. I guess there must be a function for that, but since I don&#039;t know it I use my own. So if you know something faster, please let know.<br /><pre class="bbcode">
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;
}</pre><br />I found nothing on the Web site: [<a href="http://www.minixml.org/mxml.html" rel="nofollow">www.minixml.org</a>]<br /><br />Thanks,<br /><br />Crayon]]></description>
<dc:creator>Crayon</dc:creator>
<category>Coding</category><pubDate>Tue, 25 Nov 2008 05:45:42 +0100</pubDate></item>
</channel>
</rss>