public static bool IsValidXElement(string toParse)
{
try
{
// ReSharper disable ReturnValueOfPureMethodIsNotUsed
XElement.Parse(toParse);
// ReSharper restore ReturnValueOfPureMethodIsNotUsed
return true;
}
catch(Exception ex)
{
Dev2Logger.Log.Error("XmlHelper", ex);
return false;
}
}