I think it would be nice to add a extra parameter to XMLChildCount() to make it :
XMLChildCount(*Node,Recursive=#False)
By default, XMLChildCount would only count the direct children from a parent node, with Recursive=#True, it would recursively count all children and grand-children etc ...
That would save me some coding

Ludo