public static void IterateChildren(this IXmlNode n, Action<IXmlNode> action) { for (int i = 0; i < n.ChildNodes.Length; i++) { action(n.ChildNodes[i]); } }