In this study, a numerical framework of the high order well-balanced weighted compact nonlinear (WCN) schemes is proposed for the shallow water equations based on the work in [S. Zhang, S. Jiang, C.-W Shu, J. Comput. Phys. 227 (2008) 7294-7321]. We employ a special splitting technique for the source term proposed in [Y. Xing, C.-W Shu, J. Comput. Phys. 208 (2005) 206-227] to maintain the exact C-property, which can be proved theoretically. In the meantime, the genuine high order accuracy of the numerical scheme can be observed successfully, and small perturbation of the stationary state can be resolved and evolved well. In order to capture the strong discontinuities and large gradients, the fifth-order upwind weighted nonlinear interpolations together with the fourth/sixth order cell-centered compact scheme are used to construct different WCN schemes. In addition, the local characteristic projections are considered to further restrain the potential numerical oscillations. A variety of representative one- and two-dimensional examples are tested to demonstrate the good performance of the proposed schemes.