public static void Clear(this Element parent) { while (parent.FirstChild != null) { parent.RemoveChild(parent.FirstChild); } }