private static Exception CreateValidationException(string message, XObject obj) { var location = obj.GetLocation(); return(new SchemaValidationException( message, location.FilePath, location.LineNumber, location.ColumnNumber)); }