private static void removePoolElements_Static(KElement root) { VElement v = root.getChildElementVector(null, null, null, true, 0, false); for (int j = v.Count - 1; j >= 0; j--) { KElement el = v[j]; string nam = el.Name; if (nam.Equals("InvalidAttributes") || nam.Equals("InvalidElements") || nam.Equals("UnknownAttributes") || nam.Equals("UnknownElements") || nam.Equals("MissingAttributes")) { moveChildElementVector_Static(root, el); if (!el.hasChildElements() && !el.hasAttributes()) { root.removeChild(el); } } } VElement vv = root.getChildElementVector(null, null, null, true, 0, false); for (int i = vv.Count - 1; i >= 0; i--) { removePoolElements_Static(vv[i]); } return; }