The typical industrial robots, though highly repeatable, have relatively low path accuracy. As the main source of the path deviations, joint flexibility-induced position errors between motor and link called joint position errors (JPEs) are difficult to compensate directly in the robot controller due to the lack of link-side encoders for most industrial robots. This limits the development of industrial robots to high-accuracy applications greatly. To solve this problem, this article presents a data-driven approach for online path correction of industrial robots. The proposed approach combines a novel link state estimator designed based on a modified flexible dynamics model called flexible-dynamics-based disturbance state observer with a locally weighted projection regression-based JPE prediction scheme to provide the accurate JPE estimation to the robot controller for direct compensation. Simulations and experiments, obtained on a six-axis industrial robot, demonstrate the feasibility and effectiveness of the proposed approach. Experimental results show significant improvement (>80%) in the path accuracy of a standard circular motion corrected using the proposed approach.