Dev2.Data.Util.XmlHelper.IsValidXElement C# (CSharp) Method

IsValidXElement() public static method

public static IsValidXElement ( string toParse ) : bool
toParse string
return bool
        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;
            }
        }