Resolving structural changes in photoinduced reactions in solution with X rays and electrons