  Based on fully relativistic first-principles calculations, we studied the
topological properties of layered XIn$_2$P$_2$ (X = Ca, Sr). Band inversion can
be induced by strain without SOC, forming one nodal ring in the k$_z$ = 0
plane, which is protected by the coexistence of time-reversal and
mirror-reflection symmetry. Including SOC, a substantial band gap is opened
along the nodal line and the line-node semimetal would evolve into a
topological insulator. These results reveal a category of materials showing
quantum phase transition from trivial semiconductor and topologically
nontrivial insulator by the tuneable elastic strain engineering. Our
investigations provide a new perspective about the formation of topological
line-node semimetal under stain.
