public static bool IsXml(this string payload) { bool result = false; bool isFragment; if (IsXml(payload, out isFragment)) { result = true; } else if (isFragment) { result = true; } return result; }